sd-json: Use goto finish instead of return
sd_json_buildv() uses a "finish" goto label for cleanup so make sure we goto that label on failure instead of returning directly.
This commit is contained in:
@@ -4098,7 +4098,7 @@ _public_ int sd_json_buildv(sd_json_variant **ret, va_list ap) {
|
||||
SD_JSON_BUILD_PAIR("realtime", SD_JSON_BUILD_UNSIGNED(ts->realtime)),
|
||||
SD_JSON_BUILD_PAIR("monotonic", SD_JSON_BUILD_UNSIGNED(ts->monotonic)));
|
||||
if (r < 0)
|
||||
return r;
|
||||
goto finish;
|
||||
} else
|
||||
add = JSON_VARIANT_MAGIC_NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user