lib/event: free the resource in the error case

Change-Id: I99474b93aae545cc7a2524659e3216c98f619665
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16207
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
GangCao 2023-01-10 02:01:13 -05:00 committed by Tomasz Zawadzki
parent 9e9da4675f
commit b3785e87c5

View File

@ -440,6 +440,7 @@ app_setup_trace(struct spdk_app_opts *opts)
if (error_found) {
SPDK_ERRLOG("invalid tpoint mask %s\n", opts->tpoint_group_mask);
free(tp_g_str);
return -1;
} else {
SPDK_NOTICELOG("Tracepoint Group Mask %s specified.\n", opts->tpoint_group_mask);