From 415d3501da64cfcbe098507749c796513d47ed90 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 6 Oct 2015 22:30:06 +0100 Subject: Avoid leaking memory Coverity CID 1325758, 1325759, 1325760 Signed-off-by: Dirk Hohndel --- subsurfacestartup.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'subsurfacestartup.c') 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() -- cgit v1.2.3-70-g09d2