]> git.ipfire.org Git - pakfire.git/commitdiff
json: Actually jump to the error block if JSON could not be parsed
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 21 Jun 2025 18:16:15 +0000 (18:16 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 21 Jun 2025 18:16:15 +0000 (18:16 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/json.c

index 6c62e3fc5d18e96dc720e3e7b53f55eb53a32c67..c1fb8ceeeeeb4f1e0c64787ae04647c2b77e38f7 100644 (file)
@@ -59,6 +59,7 @@ int pakfire_json_parse(struct json_object** json, char** error,
 
                // Assume that the input was invalid
                r = -EBADMSG;
+               goto ERROR;
        }
 
        // Return the object