mikey: Actually replace payload ...
authorEdward Hervey <bilboed@bilboed.com>
Mon, 12 May 2014 15:15:17 +0000 (17:15 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Mon, 12 May 2014 15:15:17 +0000 (17:15 +0200)
This function is intented to replace the payload, let's actually do that
instead of putting back the same (freed) payload

CID #1212175

gst-libs/gst/sdp/gstmikey.c

index 0629a0c..19bf608 100644 (file)
@@ -1191,7 +1191,7 @@ gst_mikey_message_replace_payload (GstMIKEYMessage * msg, guint idx,
 
   p = g_array_index (msg->payloads, GstMIKEYPayload *, idx);
   gst_mikey_payload_free (p);
-  g_array_index (msg->payloads, GstMIKEYPayload *, idx) = p;
+  g_array_index (msg->payloads, GstMIKEYPayload *, idx) = payload;
 
   return TRUE;
 }