Changeset 47f5a77 in mainline for uspace/srv/net/udp/sock.c


Ignore:
Timestamp:
2013-07-17T08:46:06Z (11 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3a0a4d8
Parents:
cdc3afa (diff), 1d94e21 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/udp/sock.c

    rcdc3afa r47f5a77  
    265265        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_sock_send()");
    266266       
     267        uint8_t *buffer = calloc(UDP_FRAGMENT_SIZE, 1);
     268        if (buffer == NULL) {
     269                async_answer_0(callid, ENOMEM);
     270                return;
     271        }
     272       
    267273        struct sockaddr_in6 *addr6 = NULL;
    268274        struct sockaddr_in *addr;
     
    276282                if (rc != EOK) {
    277283                        async_answer_0(callid, rc);
    278                         return;
     284                        goto out;
    279285                }
    280286               
     
    357363                        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_sock_sendto: Failed to "
    358364                            "determine local address.");
    359                         return;
     365                        goto out;
    360366                }
    361367               
     
    379385                        length = UDP_FRAGMENT_SIZE;
    380386               
    381                 uint8_t buffer[UDP_FRAGMENT_SIZE];
    382387                int rc = async_data_write_finalize(wcallid, buffer, length);
    383388                if (rc != EOK) {
     
    425430        if (addr6 != NULL)
    426431                free(addr6);
     432       
     433        free(buffer);
    427434}
    428435
Note: See TracChangeset for help on using the changeset viewer.