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


Ignore:
Timestamp:
2013-08-04T12:01:10Z (11 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ea50906
Parents:
b08879c2 (diff), d856110 (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

    rb08879c2 rbdae198  
    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.