From 7f945217037a253c6159d3b08d258f39883e3318 Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Wed, 30 Jan 2013 07:55:19 -0500 Subject: [PATCH] parallels: Need to free memory on error path --- src/parallels/parallels_utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/parallels/parallels_utils.c b/src/parallels/parallels_utils.c index 171f5d03d0..0b589abd23 100644 --- a/src/parallels/parallels_utils.c +++ b/src/parallels/parallels_utils.c @@ -135,8 +135,10 @@ parallelsAddFileExt(const char *path, const char *ext) return NULL; } - if (!virStrcpy(new_path, path, len)) + if (!virStrcpy(new_path, path, len)) { + VIR_FREE(new_path); return NULL; + } strcat(new_path, ext); return new_path; -- 2.47.2