[gnome-builder] compile-commands: use strfreev to free argv
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] compile-commands: use strfreev to free argv
- Date: Mon, 18 Jun 2018 22:26:36 +0000 (UTC)
commit ae0a98a3928bfe0c69ca3680227af7ecac5c0557
Author: Christian Hergert <chergert redhat com>
Date: Mon Jun 18 15:25:54 2018 -0700
compile-commands: use strfreev to free argv
We need to free the whole GStrv, not just the array container. Fixes a
leak detected with valgrind on test-ide-compile-commands.
src/libide/buildsystem/ide-compile-commands.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/libide/buildsystem/ide-compile-commands.c b/src/libide/buildsystem/ide-compile-commands.c
index def829926..c8c899d36 100644
--- a/src/libide/buildsystem/ide-compile-commands.c
+++ b/src/libide/buildsystem/ide-compile-commands.c
@@ -591,7 +591,7 @@ ide_compile_commands_filter_vala (IdeCompileCommands *self,
}
}
- g_free (*argv);
+ g_strfreev (*argv);
g_ptr_array_add (ar, NULL);
*argv = (gchar **)g_ptr_array_free (ar, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]