Skip to content

Commit 6a42764

Browse files
committed
Low: tools: Fix memory leak in crm_resource.c:option_cb()
Found by Coverity Signed-off-by: Reid Wahl <[email protected]>
1 parent 6ec960a commit 6a42764

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/crm_resource.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,8 @@ option_cb(const gchar *option_name, const gchar *optarg, gpointer data,
806806
char *value = NULL;
807807

808808
if (pcmk__scan_nvpair(optarg, &name, &value) != 2) {
809+
free(name);
810+
free(value);
809811
return FALSE;
810812
}
811813
if (options.cmdline_params == NULL) {

0 commit comments

Comments
 (0)