let's try allocating the proper amount of memory...
authorKevin P. Fleming <kpfleming@digium.com>
Thu, 23 Jun 2005 19:11:49 +0000 (19:11 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Thu, 23 Jun 2005 19:11:49 +0000 (19:11 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5987 65c4cc65-6c06-0410-ace0-fbb531ad65f3

dnsmgr.c

index 984077f..a949b0a 100755 (executable)
--- a/dnsmgr.c
+++ b/dnsmgr.c
@@ -74,7 +74,7 @@ struct ast_dnsmgr_entry *ast_dnsmgr_get(const char *name, struct in_addr *result
        if (!name || !result || ast_strlen_zero(name))
                return NULL;
 
-       entry = calloc(1, sizeof(*result) + strlen(name));
+       entry = calloc(1, sizeof(*entry) + strlen(name));
        if (!entry)
                return NULL;