mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 20:05:38 +00:00
validate: flow: Plug some leaks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/219>
This commit is contained in:
parent
4177f0995e
commit
c45e2612a9
3 changed files with 6 additions and 5 deletions
|
@ -243,7 +243,6 @@ validate_flow_format_buffer (GstBuffer * buffer, gint checksum_type,
|
|||
gchar *flags_str, *meta_str, *buffer_str;
|
||||
gchar *buffer_parts[7];
|
||||
int buffer_parts_index = 0;
|
||||
gchar *sum;
|
||||
GstMapInfo map;
|
||||
gchar **logged_fields =
|
||||
logged_fields_struct ? gst_validate_utils_get_strv (logged_fields_struct,
|
||||
|
@ -268,7 +267,7 @@ validate_flow_format_buffer (GstBuffer * buffer, gint checksum_type,
|
|||
|
||||
buffer_parts[buffer_parts_index++] = g_string_free (content, FALSE);
|
||||
} else {
|
||||
sum =
|
||||
gchar *sum =
|
||||
g_compute_checksum_for_data (checksum_type ==
|
||||
CHECKSUM_TYPE_AS_ID ? G_CHECKSUM_SHA1 : checksum_type, map.data,
|
||||
map.size);
|
||||
|
|
|
@ -461,7 +461,7 @@ run_diff (const gchar * expected_file, const gchar * actual_file)
|
|||
&error);
|
||||
if (!error) {
|
||||
gboolean colored = gst_validate_has_colored_output ();
|
||||
GSubprocess *process;
|
||||
GSubprocess *process2;
|
||||
gchar *fname = NULL;
|
||||
gint f = g_file_open_tmp ("XXXXXX.diff", &fname, NULL);
|
||||
|
||||
|
@ -470,12 +470,12 @@ run_diff (const gchar * expected_file, const gchar * actual_file)
|
|||
g_file_set_contents (fname, stdout_text, -1, NULL);
|
||||
close (f);
|
||||
|
||||
process =
|
||||
process2 =
|
||||
g_subprocess_new (G_SUBPROCESS_FLAGS_STDOUT_PIPE, &error, "bat", "-l",
|
||||
"diff", "--paging", "never", "--color", colored ? "always" : "never",
|
||||
fname, NULL);
|
||||
|
||||
g_subprocess_communicate_utf8 (process, NULL, NULL, &tmpstdout, NULL,
|
||||
g_subprocess_communicate_utf8 (process2, NULL, NULL, &tmpstdout, NULL,
|
||||
&error);
|
||||
if (!error) {
|
||||
g_free (stdout_text);
|
||||
|
@ -485,6 +485,7 @@ run_diff (const gchar * expected_file, const gchar * actual_file)
|
|||
GST_DEBUG ("Could not use bat: %s", error->message);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
g_clear_object (&process2);
|
||||
g_free (fname);
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ cdata.set('PACKAGE_VERSION', '"@0@"'.format(gst_version))
|
|||
if cc.has_header('unistd.h')
|
||||
cdata.set('HAVE_UNISTD_H', 1)
|
||||
endif
|
||||
|
||||
configure_file(output : 'config.h', configuration : cdata)
|
||||
|
||||
validate_plugins_install_dir = '@0@/gstreamer-1.0/validate'.format(get_option('libdir'))
|
||||
|
|
Loading…
Reference in a new issue