From: John Ferlan Date: Wed, 30 Jan 2013 12:55:19 +0000 (-0500) Subject: parallels: Need to free memory on error path X-Git-Tag: v1.0.3-rc1~205 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f945217037a253c6159d3b08d258f39883e3318;p=thirdparty%2Flibvirt.git parallels: Need to free memory on error path --- 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;