* Fix a free'd memory access crash that occurs with malloc debugging enabled [1]

* Use a better fix from GStreamer CVS to fix the double free in gst-inspect [2]

Found by:	monkey-bubble [1]
Obtained from:	GStreamer CVS [2]
This commit is contained in:
Joe Marcus Clarke 2004-07-03 03:51:29 +00:00
parent 561a46013b
commit 08593c3eff
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=112830
6 changed files with 60 additions and 20 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= gstreamer
PORTVERSION= 0.8.3
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= multimedia
MASTER_SITES= ${MASTER_SITE_GNOME} \
http://gstreamer.freedesktop.org/src/gstreamer/

View file

@ -0,0 +1,20 @@
--- gst/schedulers/gstoptimalscheduler.c.orig Fri Jul 2 23:38:37 2004
+++ gst/schedulers/gstoptimalscheduler.c Fri Jul 2 23:38:42 2004
@@ -2276,7 +2277,7 @@
GST_LOG ("elements still have links with other elements in the group");
- while (group->elements)
+ while (group && group->elements)
for (l = group->elements; l && l->data; l = l->next) {
GstElement *element = (GstElement *) l->data;
@@ -2309,7 +2310,7 @@
}
if (linkcount < 2) {
- remove_from_group (group, element);
+ group = remove_from_group (group, element);
}
/* if linkcount == 2, it will be unlinked later on */
else if (linkcount > 2) {

View file

@ -1,10 +1,10 @@
--- tools/gst-inspect.c.orig Wed Jun 30 01:48:58 2004
+++ tools/gst-inspect.c Wed Jun 30 01:49:18 2004
@@ -799,7 +799,6 @@
g_free (query);
if (found_signals) {
- g_slist_foreach (found_signals, (GFunc) g_free, NULL);
g_slist_free (found_signals);
--- tools/gst-inspect.c.orig Mon May 24 12:12:28 2004
+++ tools/gst-inspect.c Fri Jul 2 23:49:02 2004
@@ -797,7 +797,6 @@
g_free (indent);
}
}
- g_free (query);
if (found_signals) {
g_slist_foreach (found_signals, (GFunc) g_free, NULL);
g_slist_free (found_signals);

View file

@ -7,7 +7,7 @@
PORTNAME= gstreamer
PORTVERSION= 0.8.3
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= multimedia
MASTER_SITES= ${MASTER_SITE_GNOME} \
http://gstreamer.freedesktop.org/src/gstreamer/

View file

@ -0,0 +1,20 @@
--- gst/schedulers/gstoptimalscheduler.c.orig Fri Jul 2 23:38:37 2004
+++ gst/schedulers/gstoptimalscheduler.c Fri Jul 2 23:38:42 2004
@@ -2276,7 +2277,7 @@
GST_LOG ("elements still have links with other elements in the group");
- while (group->elements)
+ while (group && group->elements)
for (l = group->elements; l && l->data; l = l->next) {
GstElement *element = (GstElement *) l->data;
@@ -2309,7 +2310,7 @@
}
if (linkcount < 2) {
- remove_from_group (group, element);
+ group = remove_from_group (group, element);
}
/* if linkcount == 2, it will be unlinked later on */
else if (linkcount > 2) {

View file

@ -1,10 +1,10 @@
--- tools/gst-inspect.c.orig Wed Jun 30 01:48:58 2004
+++ tools/gst-inspect.c Wed Jun 30 01:49:18 2004
@@ -799,7 +799,6 @@
g_free (query);
if (found_signals) {
- g_slist_foreach (found_signals, (GFunc) g_free, NULL);
g_slist_free (found_signals);
--- tools/gst-inspect.c.orig Mon May 24 12:12:28 2004
+++ tools/gst-inspect.c Fri Jul 2 23:49:02 2004
@@ -797,7 +797,6 @@
g_free (indent);
}
}
- g_free (query);
if (found_signals) {
g_slist_foreach (found_signals, (GFunc) g_free, NULL);
g_slist_free (found_signals);