Fix: memory leak in userspace probe param parsing
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Mon, 27 Aug 2018 20:28:26 +0000 (16:28 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 29 Aug 2018 20:36:06 +0000 (16:36 -0400)
Found by Coverity:
CID 1395217:    (RESOURCE_LEAK)
Variable "real_target_path" going out of scope leaks the storage it
points to.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng/commands/enable_events.c

index d973c5f6e1cc3579998aead3e2fba656f96ad428..48fa614bdc10750a7a2d9ae3639fdbfa741bbf6f 100644 (file)
@@ -468,7 +468,7 @@ static int parse_userspace_probe_opts(struct lttng_event *ev, char *opt)
                break;
        default:
                ret = CMD_ERROR;
-               goto end_string;
+               goto end_free_path;
        }
 
        switch (ev->type) {
This page took 0.025227 seconds and 4 git commands to generate.