summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2001-06-23 20:47:29 +0000
committerDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2001-06-23 20:47:29 +0000
commite6600aaae748d8cf91cf12db8b22853d293bd77b (patch)
tree675db8f39e37d40be88698c560474922dfea0571 /src
parentee8df4f4d8e2088da9dbc38e3230fad1de64908f (diff)
downloadxine-lib-e6600aaae748d8cf91cf12db8b22853d293bd77b.tar.gz
xine-lib-e6600aaae748d8cf91cf12db8b22853d293bd77b.tar.bz2
Fixed mrls malloc bug.
CVS patchset: 219 CVS date: 2001/06/23 20:47:29
Diffstat (limited to 'src')
-rw-r--r--src/input/input_file.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/input/input_file.c b/src/input/input_file.c
index eba41cbd1..e7e7f6ecc 100644
--- a/src/input/input_file.c
+++ b/src/input/input_file.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: input_file.c,v 1.13 2001/06/23 14:05:47 f1rmb Exp $
+ * $Id: input_file.c,v 1.14 2001/06/23 20:47:29 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -73,7 +73,7 @@ typedef struct {
config_values_t *config;
int mrls_allocated_entries;
- mrl_t *mrls[1];
+ mrl_t **mrls;
} file_input_plugin_t;
@@ -264,6 +264,7 @@ static mrl_t **file_plugin_get_dir (input_plugin_t *this_gen,
}
else {
+ printf("realloc\n");
this->mrls[num_files]->mrl = (char *)
realloc(this->mrls[num_files]->mrl, strlen(fullpathname) + 1);
}
@@ -420,9 +421,8 @@ input_plugin_t *init_input_plugin (int iface, config_values_t *config) {
this->mrl = NULL;
this->config = config;
- this->mrls[0] = (mrl_t *) malloc(sizeof(mrl_t));
- this->mrls[0]->mrl = (char *) malloc(sizeof(char *));
- this->mrls_allocated_entries = 1;
+ this->mrls = (mrl_t **) malloc(sizeof(mrl_t));
+ this->mrls_allocated_entries = 0;
return (input_plugin_t *) this;
break;