summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2007-08-08 22:44:03 +0100
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2007-08-08 22:44:03 +0100
commita8419890b93e08fbe1973d0d4a8673fbace2cca9 (patch)
tree883e3edd794eedcd741f1eca388adad963a8be0d
parent7c671e1d523f7707ddaa1d7d7111ffca58772bf4 (diff)
downloadxine-lib-a8419890b93e08fbe1973d0d4a8673fbace2cca9.tar.gz
xine-lib-a8419890b93e08fbe1973d0d4a8673fbace2cca9.tar.bz2
Fix an attempted free of static data, e.g. when using "dvd:/" (not "dvd://").
-rw-r--r--src/input/input_dvd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c
index 9f8aa6a25..34729e8c2 100644
--- a/src/input/input_dvd.c
+++ b/src/input/input_dvd.c
@@ -1477,7 +1477,7 @@ static int dvd_plugin_open (input_plugin_t *this_gen) {
dvd_input_plugin_t *this = (dvd_input_plugin_t*)this_gen;
dvd_input_class_t *class = (dvd_input_class_t*)this_gen->input_class;
- char *locator;
+ char *locator, *locator_orig;
char *title_part;
xine_event_t event;
xine_cfg_entry_t region_entry, lang_entry, cfg_entry;
@@ -1485,7 +1485,7 @@ static int dvd_plugin_open (input_plugin_t *this_gen) {
trace_print("Called\n");
/* we already checked the "dvd:/" MRL before */
- locator = strdup (this->mrl + (sizeof("dvd:") - 1));
+ locator_orig = locator = strdup (this->mrl + (sizeof("dvd:") - 1));
/* FIXME: call a generic xine-lib MRL parser here to pre-parse
* the MRL for ?title=<title>&part=<part> stuff and to expand
@@ -1501,11 +1501,11 @@ static int dvd_plugin_open (input_plugin_t *this_gen) {
_x_message(this->stream, XINE_MSG_READ_ERROR,
/* FIXME: see FIXME in dvd_parse_try_open() */
(strlen(locator) && !(locator[0] == '/' && locator[1] == '\0')) ? locator : class->dvd_device, NULL);
- free (locator);
+ free (locator_orig);
return 0;
}
- free (locator);
+ free (locator_orig);
dvdnav_get_title_string(this->dvdnav, &this->dvd_name);
if(this->dvd_name)