Use ast_free() instead of free().
authorRussell Bryant <russell@russellbryant.com>
Wed, 5 Dec 2007 03:34:51 +0000 (03:34 +0000)
committerRussell Bryant <russell@russellbryant.com>
Wed, 5 Dec 2007 03:34:51 +0000 (03:34 +0000)
(closes issue #11309)
Reported by: Laureano
Patches:
      res_odbc.c.patch uploaded by Laureano (license 265)

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

res/res_odbc.c

index 9cd3de4..391a203 100644 (file)
@@ -470,7 +470,7 @@ struct odbc_obj *ast_odbc_request_obj(const char *name, int check)
                        if (odbc_obj_connect(obj) == ODBC_FAIL) {
                                ast_log(LOG_WARNING, "Failed to connect to %s\n", name);
                                ast_mutex_destroy(&obj->lock);
-                               free(obj);
+                               ast_free(obj);
                                obj = NULL;
                                class->count--;
                        } else {