summaryrefslogtreecommitdiff
path: root/src/input/input_smb.c
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2011-12-10 22:49:27 +0000
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2011-12-10 22:49:27 +0000
commit471aee5bb21bb5d568ac1ddaea0b35c18cda5c07 (patch)
tree77d42d4a0c337d4001d100b49b785f2604deeb0e /src/input/input_smb.c
parentc6324255117128d3a7a9f614c756022d3ef7461d (diff)
parent508e9088eec8f00b5dea9571383480803d4ad45e (diff)
downloadxine-lib-471aee5bb21bb5d568ac1ddaea0b35c18cda5c07.tar.gz
xine-lib-471aee5bb21bb5d568ac1ddaea0b35c18cda5c07.tar.bz2
Merge from 1.1.
--HG-- rename : src/liba52/xine_a52_decoder.c => src/audio_dec/xine_a52_decoder.c rename : src/libspudvb/xine_spudvb_decoder.c => src/spu_dec/spudvb_decoder.c rename : src/libxinevdec/image.c => src/video_dec/image.c
Diffstat (limited to 'src/input/input_smb.c')
-rw-r--r--src/input/input_smb.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/input/input_smb.c b/src/input/input_smb.c
index b2211e2ae..f3c2c035d 100644
--- a/src/input/input_smb.c
+++ b/src/input/input_smb.c
@@ -345,7 +345,7 @@ static xine_mrl_t **smb_class_get_dir (input_class_t *this_gen,
(this->mrls_allocated_entries+1) * sizeof(xine_mrl_t*));
this->mrls[num_files] = calloc(1, sizeof(xine_mrl_t));
}else
- memset(this->mrls[num_files], 0, sizeof(xine_mrl_t));
+ MRL_ZERO(this->mrls[num_files]);
MRL_DUPLICATE(&dir_files[i], this->mrls[num_files]);
@@ -362,7 +362,7 @@ static xine_mrl_t **smb_class_get_dir (input_class_t *this_gen,
(this->mrls_allocated_entries+1) * sizeof(xine_mrl_t*));
this->mrls[num_files] = calloc(1, sizeof(xine_mrl_t));
}else
- memset(this->mrls[num_files], 0, sizeof(xine_mrl_t));
+ MRL_ZERO(this->mrls[num_files]);
MRL_DUPLICATE(&norm_files[i], this->mrls[num_files]);
@@ -440,6 +440,20 @@ smb_plugin_open (input_plugin_t *this_gen )
return 1;
}
+static void
+smb_class_dispose (input_class_t *this_gen)
+{
+ smb_input_class_t *this = (smb_input_class_t *) this_gen;
+
+ while(this->mrls_allocated_entries) {
+ MRL_ZERO(this->mrls[this->mrls_allocated_entries - 1]);
+ free(this->mrls[this->mrls_allocated_entries--]);
+ }
+ free(this->mrls);
+
+ free (this);
+}
+
static input_plugin_t *
smb_class_get_instance (input_class_t *class_gen, xine_stream_t *stream,
const char *mrl)
@@ -498,7 +512,7 @@ static void
this->input_class.description = N_("CIFS/SMB input plugin based on libsmbclient");
this->input_class.get_dir = smb_class_get_dir;
this->input_class.get_autoplay_list = NULL;
- this->input_class.dispose = default_input_class_dispose;
+ this->input_class.dispose = smb_class_dispose;
this->input_class.eject_media = NULL;
_exit_error: