summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-12-18 22:00:31 +0100
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-12-18 22:00:31 +0100
commit0c8f64fe6f210591a36aaf9261a8106db2a20ea0 (patch)
treec607119b0947883634ccf40000c9f7c45a1b4822 /src
parent60fb61f5d503d16233b2bfed884cd7bfd9865343 (diff)
downloadxine-lib-0c8f64fe6f210591a36aaf9261a8106db2a20ea0.tar.gz
xine-lib-0c8f64fe6f210591a36aaf9261a8106db2a20ea0.tar.bz2
Use strdup.
Diffstat (limited to 'src')
-rw-r--r--src/input/vcd/xineplug_inp_vcd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/input/vcd/xineplug_inp_vcd.c b/src/input/vcd/xineplug_inp_vcd.c
index 45d9789ba..b794331f1 100644
--- a/src/input/vcd/xineplug_inp_vcd.c
+++ b/src/input/vcd/xineplug_inp_vcd.c
@@ -272,11 +272,9 @@ vcd_add_mrl_slot(vcd_input_class_t *this, const char *mrl, off_t size,
this->mrls[*i]->type = mrl_vcd;
this->mrls[*i]->size = size * M2F2_SECTOR_SIZE;
- this->mrls[*i]->mrl = (char *) malloc(strlen(mrl) + 1);
+ this->mrls[*i]->mrl = strdup(mrl);
if (NULL==this->mrls[*i]->mrl) {
- LOG_ERR("Can't malloc %zu bytes for MRL name %s", sizeof(xine_mrl_t), mrl);
- } else {
- sprintf(this->mrls[*i]->mrl, "%s", mrl);
+ LOG_ERR("Can't strndup %zu bytes for MRL name %s", strlen(mrl), mrl);
}
(*i)++;
}