extras/physfshttpd.c
branchstable-2.0
changeset 1022 38a62549ad4c
parent 912 a68ff7aaf9a3
equal deleted inserted replaced
1020:1b4730384fc3 1022:38a62549ad4c
   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