extras/physfshttpd.c
branchstable-1.0
changeset 1023 024b940b32a9
parent 911 ba7133068da7
equal deleted inserted replaced
1021:7facbc5f4192 1023:024b940b32a9
   154     http_args *args = (http_args *) malloc(sizeof (http_args));
   154     http_args *args = (http_args *) malloc(sizeof (http_args));
   155     if (args == NULL)
   155     if (args == NULL)
   156     {
   156     {
   157         printf("out of memory.\n");
   157         printf("out of memory.\n");
   158         return;
   158         return;
   159     } // if
   159     } /* if */
   160     args->addr = (struct sockaddr *) malloc(addrlen);
   160     args->addr = (struct sockaddr *) malloc(addrlen);
   161     if (args->addr == NULL)
   161     if (args->addr == NULL)
   162     {
   162     {
   163         free(args);
   163         free(args);
   164         printf("out of memory.\n");
   164         printf("out of memory.\n");
   165         return;
   165         return;
   166     } // if
   166     } /* if */
   167 
   167 
   168     args->sock = sock;
   168     args->sock = sock;
   169     args->addrlen = addrlen;
   169     args->addrlen = addrlen;
   170     memcpy(args->addr, addr, addrlen);
   170     memcpy(args->addr, addr, addrlen);
   171 
   171