]> git.saurik.com Git - apple/network_cmds.git/commitdiff
network_cmds-325.1.tar.gz mac-os-x-1062 v325.1
authorApple <opensource@apple.com>
Fri, 25 Sep 2009 00:07:58 +0000 (00:07 +0000)
committerApple <opensource@apple.com>
Fri, 25 Sep 2009 00:07:58 +0000 (00:07 +0000)
natd.tproj/natd.c

index 3bb6c70d2067073c898c14e0c88014597e7d17e0..2ec16213d2bddb5f803000d684eb67a2722e7b55 100644 (file)
@@ -1938,7 +1938,7 @@ static void ParseOption (const char* option, const char* parms)
        {
                if (forwardedinterfacename != NULL)
                {
        {
                if (forwardedinterfacename != NULL)
                {
-                       if ( realloc(forwardedinterfacename, (numofinterfaces+1) * sizeof(*forwardedinterfacename)) == NULL){
+                       if ( (forwardedinterfacename = realloc( forwardedinterfacename, (numofinterfaces+1) * sizeof(*forwardedinterfacename ))) == NULL ){
                                printf("realloc error, cannot allocate memory for fowarded interface name.\n");
                                return;
                        }
                                printf("realloc error, cannot allocate memory for fowarded interface name.\n");
                                return;
                        }