git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@224 d0543943-73ff-0310-b7d9-9358b9ac24b2

This commit is contained in:
Anthony Minessale 2005-12-28 17:11:47 +00:00
parent d5eaa0bdc9
commit be19275578

View File

@ -526,6 +526,8 @@ SWITCH_DECLARE(char *) switch_core_permenant_strdup(char *todup)
assert(runtime.memory_pool != NULL); assert(runtime.memory_pool != NULL);
if (!todup) return NULL;
len = strlen(todup) + 1; len = strlen(todup) + 1;
if (todup && (duped = apr_palloc(runtime.memory_pool, len))) { if (todup && (duped = apr_palloc(runtime.memory_pool, len))) {
strncpy(duped, todup, len); strncpy(duped, todup, len);
@ -541,6 +543,8 @@ SWITCH_DECLARE(char *) switch_core_session_strdup(switch_core_session *session,
assert(session != NULL); assert(session != NULL);
assert(session->pool != NULL); assert(session->pool != NULL);
if (!todup) return NULL;
len = strlen(todup) + 1; len = strlen(todup) + 1;
if (todup && (duped = apr_palloc(session->pool, len))) { if (todup && (duped = apr_palloc(session->pool, len))) {
@ -557,6 +561,7 @@ SWITCH_DECLARE(char *) switch_core_strdup(switch_memory_pool *pool, char *todup)
assert(pool != NULL); assert(pool != NULL);
assert(todup != NULL); assert(todup != NULL);
if (!todup) return NULL;
len = strlen(todup) + 1; len = strlen(todup) + 1;
if (todup && (duped = apr_palloc(pool, len))) { if (todup && (duped = apr_palloc(pool, len))) {