Avoid g_error_free

Rely on g_autoptr() instead. This avoids having to free the
error.
This commit is contained in:
Guido Günther
2021-11-16 14:41:40 +01:00
parent 34885afac0
commit 9c5b9d67aa
3 changed files with 7 additions and 14 deletions

View File

@@ -597,7 +597,7 @@ process_capture_burst(GdkTexture *thumb)
burst_dir,
capture_fname,
save_dng_s);
GError *error = NULL;
g_autoptr(GError) error = NULL;
GSubprocess *proc = g_subprocess_new(G_SUBPROCESS_FLAGS_STDOUT_PIPE,
&error,
processing_script,
@@ -609,7 +609,6 @@ process_capture_burst(GdkTexture *thumb)
if (!proc) {
g_printerr("Failed to spawn postprocess process: %s\n",
error->message);
g_error_free(error);
return;
}