]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
coredump: fix error path
authorLennart Poettering <lennart@poettering.net>
Thu, 10 Aug 2023 10:13:07 +0000 (12:13 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 10 Aug 2023 10:13:09 +0000 (12:13 +0200)
We must go through finish, to undo the destruction of the final elements
of the iovw properly.

src/coredump/coredump.c

index 08be963b8a2769056e9ef7fb7e154ad8d163e8c0..9a2066858d3b05b88a8ec9bce3f985edcd28c182 100644 (file)
@@ -1468,7 +1468,7 @@ static int process_backtrace(int argc, char *argv[]) {
 
                 r = iovw_put_string_field(iovw, "MESSAGE=", message);
                 if (r < 0)
-                        return r;
+                        goto finish;
         } else {
                 /* The imported iovecs are not supposed to be freed by us so let's store
                  * them at the end of the array so we can skip them while freeing the