commit 0c92744a7b39f92be3b99012f3d7d0ebf0c428fb from: Stefan Sperling date: Thu Sep 20 13:05:17 2018 UTC initialize *outfile in got_opentemp_named() commit - ff7c4d82c988b29ccdebc81c5bd48dc4d595400b commit + 0c92744a7b39f92be3b99012f3d7d0ebf0c428fb blob - 90af269f16900ad7f3484481718bef2f88c6ed82 blob + 082513f08946d9059c5cf1788e363acbe82371fa --- lib/opentemp.c +++ lib/opentemp.c @@ -62,6 +62,8 @@ got_opentemp_named(char **path, FILE **outfile, const const struct got_error *err = NULL; int fd; + *outfile = NULL; + if (asprintf(path, "%s-XXXXXX", basepath) == -1) { *path = NULL; return got_error_from_errno();