X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fuserspace-probe.c;h=f6aa46c4c18812e6c250f28b550c291ca8d5173a;hb=7b25210ca15a6c7d33b6b6d93945fc390225e930;hp=e764d137b9f3b8c8c7b973a1a3787c84986ccc9e;hpb=d7ee7196fb236c616cc64de0486cf8d659e235a2;p=lttng-tools.git diff --git a/src/common/userspace-probe.c b/src/common/userspace-probe.c index e764d137b..f6aa46c4c 100644 --- a/src/common/userspace-probe.c +++ b/src/common/userspace-probe.c @@ -276,6 +276,7 @@ lttng_userspace_probe_location_tracepoint_create_no_check(const char *binary_pat error: free(probe_name_copy); free(provider_name_copy); + free(binary_path_copy); if (binary_fd >= 0) { if (close(binary_fd)) { PERROR("Error closing binary fd in error path"); @@ -1105,12 +1106,14 @@ int lttng_userspace_probe_location_function_create_from_buffer( function_name = lttng_strndup(function_name_src, LTTNG_SYMBOL_NAME_LEN); if (!function_name) { PERROR("lttng_strndup"); + ret = -LTTNG_ERR_NOMEM; goto end; } binary_path = lttng_strndup(binary_path_src, LTTNG_PATH_MAX); if (!binary_path) { PERROR("lttng_strndup"); + ret = -LTTNG_ERR_NOMEM; goto end; } @@ -1187,7 +1190,7 @@ int lttng_userspace_probe_location_tracepoint_create_from_buffer( goto end; } - binary_path = lttng_strndup(binary_path_src, LTTNG_SYMBOL_NAME_LEN); + binary_path = lttng_strndup(binary_path_src, LTTNG_PATH_MAX); if (!binary_path) { PERROR("lttng_strndup"); goto end;