e->data can be NULL, so use the safe version of ast_strdup()
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 15 Aug 2008 19:22:48 +0000 (19:22 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 15 Aug 2008 19:22:48 +0000 (19:22 +0000)
(closes issue #13312)
 Reported by: pj

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@138124 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/pbx.c

index 86cac53..55b97bc 100644 (file)
@@ -3391,7 +3391,7 @@ int ast_extension_state_add(const char *context, const char *exten,
         */
        if (e->exten[0] == '_') {
                ast_add_extension(e->parent->name, 0, exten, e->priority, e->label,
-                       e->cidmatch, e->app, strdup(e->data), free,
+                       e->cidmatch, e->app, ast_strdup(e->data), free,
                        e->registrar);
                e = ast_hint_extension(NULL, context, exten);
                if (!e || e->exten[0] == '_') {