Avoid leaking memory

Coverity CID 1325758, 1325759, 1325760

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-10-06 22:30:06 +01:00
parent 0db9bbdea7
commit 415d3501da

View file

@ -153,9 +153,15 @@ void print_files()
} else { } else {
printf("Unable to get local git directory\n"); printf("Unable to get local git directory\n");
} }
printf("Cloud URL: %s\n", cloud_url()); char *tmp = cloud_url();
printf("Image hashes: %s\n", hashfile_name_string()); printf("Cloud URL: %s\n", tmp);
printf("Local picture directory: %s\n\n", picturedir_string()); 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() static void print_help()