X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcommon%2Fuserspace-probe.c;h=16c879df236e4c0250ad40682a8e6148df775c5f;hb=ded5877bea77c2ec3c95e5ec91dc52ba434cdf13;hp=e764d137b9f3b8c8c7b973a1a3787c84986ccc9e;hpb=d7ee7196fb236c616cc64de0486cf8d659e235a2;p=lttng-tools.git diff --git a/src/common/userspace-probe.c b/src/common/userspace-probe.c index e764d137b..16c879df2 100644 --- a/src/common/userspace-probe.c +++ b/src/common/userspace-probe.c @@ -1,18 +1,8 @@ /* - * Copyright (C) 2017 - Jérémie Galarneau + * Copyright (C) 2017 Jérémie Galarneau * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License, version 2.1 only, - * as published by the Free Software Foundation. + * SPDX-License-Identifier: LGPL-2.1-only * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include @@ -276,6 +266,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 +1096,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; }