mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
libekmfweb: Fix invalid free in error path of parse_json_web_token()
Don't attempt to free the local function parameter 'signature', but the memory where *signature points to. Assisted-by: IBM Bob:2.0.0 Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com> Reviewed-by: Finn Callies <fcallies@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
cc6f1a6d7b
commit
52158e73fa
@@ -366,9 +366,9 @@ out:
|
||||
*payload_obj = pld;
|
||||
else
|
||||
json_object_put(pld);
|
||||
if (signature != NULL && rc != 0) {
|
||||
free(signature);
|
||||
signature = NULL;
|
||||
if (signature != NULL && *signature != NULL && rc != 0) {
|
||||
free(*signature);
|
||||
*signature = NULL;
|
||||
*signature_len = 0;
|
||||
}
|
||||
if (json != NULL)
|
||||
|
||||
Reference in New Issue
Block a user