summaryrefslogtreecommitdiffstats
path: root/subsurfacestartup.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-10-06 22:30:06 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-10-06 22:46:43 +0100
commit415d3501da64cfcbe098507749c796513d47ed90 (patch)
treea6716c5940cd323158e3f8f8242050835a15dee3 /subsurfacestartup.c
parent0db9bbdea7e5f0c84f0e243e8897e5ea23bfab2c (diff)
downloadsubsurface-415d3501da64cfcbe098507749c796513d47ed90.tar.gz
Avoid leaking memory
Coverity CID 1325758, 1325759, 1325760 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurfacestartup.c')
-rw-r--r--subsurfacestartup.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/subsurfacestartup.c b/subsurfacestartup.c
index d474ab924..1286885ee 100644
--- a/subsurfacestartup.c
+++ b/subsurfacestartup.c
@@ -153,9 +153,15 @@ void print_files()
} else {
printf("Unable to get local git directory\n");
}
- printf("Cloud URL: %s\n", cloud_url());
- printf("Image hashes: %s\n", hashfile_name_string());
- printf("Local picture directory: %s\n\n", picturedir_string());
+ char *tmp = cloud_url();
+ printf("Cloud URL: %s\n", tmp);
+ free(tmp);
+ tmp = hashfile_name_string();
+ printf("Image hashes: %s\n", tmp);
+ free(tmp);
+ tmp = picturedir_string();
+ printf("Local picture directory: %s\n\n", tmp);
+ free(tmp);
}
static void print_help()