tmpdirs: fix typo in variable name

On mkdtemp error, free tmppath and not tmpdir (which is CLEANUP_FREE).

Fixes commit 673a7a959c.
This commit is contained in:
Pino Toscano
2016-02-09 14:18:15 +01:00
parent 15d28b09c0
commit 41afeb266d

View File

@@ -157,7 +157,7 @@ lazy_make_tmpdir (guestfs_h *g, char *(*getdir) (guestfs_h *g), char **dest)
char *tmppath = safe_asprintf (g, "%s/libguestfsXXXXXX", tmpdir);
if (mkdtemp (tmppath) == NULL) {
perrorf (g, _("%s: cannot create temporary directory"), tmppath);
free (tmpdir);
free (tmppath);
return -1;
}
/* Allow qemu (which may be running as qemu.qemu) to read in this