@ -203,10 +203,13 @@ static int __dir_open(void *m, sexp_t *sx)
DIR *dp = NULL;
if ( !(dp = opendir(dir_name)) ) {
pthread_rwlock_unlock(&_lock);
free(item);
FREE(item);
FREE(dir_name);
return sxmsg_return(msg, SNE_FAILED);
}
/* init stream */
item->dsid = _rd_last_id;
item->dp = dp;