forked from Mirrors/freeswitch
add check.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6842 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
171f02c9ad
commit
06a0c90e50
|
@ -476,6 +476,7 @@ SWITCH_DECLARE(switch_status_t) switch_dir_open(switch_dir_t **new_dir, const ch
|
|||
switch_status_t status;
|
||||
switch_dir_t *dir = malloc(sizeof(*dir));
|
||||
|
||||
switch_assert(dir);
|
||||
memset(dir, 0, sizeof(*dir));
|
||||
if ((status = apr_dir_open(&(dir->dir_handle), dirname, pool)) == APR_SUCCESS) {
|
||||
*new_dir = dir;
|
||||
|
|
Loading…
Reference in New Issue