asfdemux: Do not try to free const pointer

In gst_asf_demux_chain_headers, when 'goto wrong_type' was called
asfdemux tried to free a const pointer that had been cast to a
normal pointer variable.
This commit is contained in:
Thiago Santos 2009-06-26 20:52:29 -03:00
parent 3c683ead7b
commit 6e2a117eb2

View file

@ -744,13 +744,14 @@ gst_asf_demux_chain_headers (GstASFDemux * demux)
GstFlowReturn flow; GstFlowReturn flow;
AsfObject obj; AsfObject obj;
guint8 *header_data, *data = NULL; guint8 *header_data, *data = NULL;
const guint8 *cdata = NULL;
guint64 header_size; guint64 header_size;
data = (guint8 *) gst_adapter_peek (demux->adapter, ASF_OBJECT_HEADER_SIZE); cdata = (guint8 *) gst_adapter_peek (demux->adapter, ASF_OBJECT_HEADER_SIZE);
if (data == NULL) if (cdata == NULL)
goto need_more_data; goto need_more_data;
asf_demux_peek_object (demux, data, ASF_OBJECT_HEADER_SIZE, &obj); asf_demux_peek_object (demux, cdata, ASF_OBJECT_HEADER_SIZE, &obj);
if (obj.id != ASF_OBJ_HEADER) if (obj.id != ASF_OBJ_HEADER)
goto wrong_type; goto wrong_type;