Commit 1a6543c5 authored by Thomas Jarosch's avatar Thomas Jarosch Committed by Stephen Hemminger

Fix memory leak of lname variable in get_target_name()

Detected by cppcheck.
Signed-off-by: default avatarThomas Jarosch <thomas.jarosch@intra2net.com>
parent 9f1ba570
......@@ -281,6 +281,7 @@ get_target_name(const char *name)
fputs(dlerror(), stderr);
printf("\n");
free(new_name);
free(lname);
return NULL;
}
}
......@@ -297,6 +298,7 @@ get_target_name(const char *name)
fprintf(stderr, "\n");
dlclose(handle);
free(new_name);
free(lname);
return NULL;
}
}
......@@ -304,6 +306,7 @@ get_target_name(const char *name)
}
free(new_name);
free(lname);
return m;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment