From 41afeb266ddd46e1b2a0700facfa202dae2386ae Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 9 Feb 2016 14:18:15 +0100 Subject: [PATCH] tmpdirs: fix typo in variable name On mkdtemp error, free tmppath and not tmpdir (which is CLEANUP_FREE). Fixes commit 673a7a959c15e9a389a13620f3a10cb12a9537d0. --- src/tmpdirs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tmpdirs.c b/src/tmpdirs.c index 0a36f2f16..afa3dd483 100644 --- a/src/tmpdirs.c +++ b/src/tmpdirs.c @@ -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