diff options
Diffstat (limited to 'src/input/input_smb.c')
-rw-r--r-- | src/input/input_smb.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/input/input_smb.c b/src/input/input_smb.c index d82ab0aa7..e3ad51eb1 100644 --- a/src/input/input_smb.c +++ b/src/input/input_smb.c @@ -356,7 +356,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]); @@ -373,7 +373,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]); @@ -456,6 +456,12 @@ 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); } |