aboutsummaryrefslogtreecommitdiffstats
path: root/capchild
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-01-13 15:13:40 -0800
committerGuy Harris <guy@alum.mit.edu>2015-01-13 23:14:13 +0000
commit63a3d043e3f14eebb0798a250d9aecdc8e89dfb9 (patch)
tree69a58dd4cadfc7f98669cba229e76fa8c60e0761 /capchild
parent9f5e4fb7a51741a286ce5bc92a6f335ed58587a2 (diff)
Consistently use the "g_string_free returns a C string pointer" idiom.
g_string_free(str, FALSE) frees the GString container but not the underlying g_malloc()ed string; instead, it returns a pointer to the g_malloc()ed string. Fix those places that didn't already get the string pointer from g_string_free() to do so rather than manually extracting the string themselves. And fix one place that didn't even need to use a string - it was just scanning a C string without even modifying it. Change-Id: Ibbf4872bf5b9935b9907f539b6edb1013f3053a5 Reviewed-on: https://code.wireshark.org/review/6532 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'capchild')
-rw-r--r--capchild/capture_sync.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/capchild/capture_sync.c b/capchild/capture_sync.c
index e1c6870745..55be896395 100644
--- a/capchild/capture_sync.c
+++ b/capchild/capture_sync.c
@@ -1147,8 +1147,7 @@ sync_pipe_run_command_actual(char** argv, gchar **data, gchar **primary_msg,
*/
*primary_msg = NULL;
*secondary_msg = NULL;
- *data = data_buf->str;
- g_string_free(data_buf, FALSE);
+ *data = g_string_free(data_buf, FALSE);
}
break;