summaryrefslogtreecommitdiff
path: root/src/input/input_vcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/input/input_vcd.c')
-rw-r--r--src/input/input_vcd.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/input/input_vcd.c b/src/input/input_vcd.c
index 02c2e83ab..760037e93 100644
--- a/src/input/input_vcd.c
+++ b/src/input/input_vcd.c
@@ -997,16 +997,9 @@ static xine_mrl_t **vcd_class_get_dir (input_class_t *this_gen, const char *file
memset(this->mrls[(i-1)], 0, sizeof(xine_mrl_t));
}
- if(this->mrls[(i-1)]->mrl) {
- this->mrls[(i-1)]->mrl = (char *)
- realloc(this->mrls[(i-1)]->mrl, strlen(mrl) + 1);
- }
- else {
- this->mrls[(i-1)]->mrl = (char *) xine_xmalloc(strlen(mrl) + 1);
- }
-
this->mrls[i-1]->origin = NULL;
- sprintf(this->mrls[i-1]->mrl, "%s", mrl);
+ free(this->mrls[(i-1)]->mrl);
+ this->mrls[i-1]->mrl = strdup(mrl);
this->mrls[i-1]->link = NULL;
this->mrls[i-1]->type = (0 | mrl_vcd);