Commit 464611ac authored by Edward Hervey's avatar Edward Hervey
Browse files

mikey: Free MikeyPayload in error cases

CID #1212136
parent 783195cc
......@@ -1301,8 +1301,10 @@ gst_mikey_message_add_rand (GstMIKEYMessage * msg, guint8 len,
g_return_val_if_fail (len != 0 && rand != NULL, FALSE);
p = gst_mikey_payload_new (GST_MIKEY_PT_RAND);
if (!gst_mikey_payload_rand_set (p, len, rand))
if (!gst_mikey_payload_rand_set (p, len, rand)) {
gst_mikey_payload_free (p);
return FALSE;
return gst_mikey_message_insert_payload (msg, -1, p);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment