Changeset 64db6d3 in rtems


Ignore:
Timestamp:
Feb 20, 2003, 9:21:46 PM (18 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Children:
6ba05a77
Parents:
8daecd8
Message:

2003-02-20 Till Straumann <strauman@…>

PR 351/networking

  • nfs/bootp_subr.c: Fix ridiculous leak in bootp and use strdup_bootp_realloc() everywhere for sake of consistency.
Location:
cpukit/libnetworking
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libnetworking/ChangeLog

    r8daecd8 r64db6d3  
     12003-02-20      Till Straumann <strauman@slac.stanford.edu>
     2
     3        PR 351/networking
     4        * nfs/bootp_subr.c: Fix ridiculous leak in bootp and use
     5        strdup_bootp_realloc() everywhere for sake of consistency.
     6
    172003-02-11      Mike Siers <mikes@poliac.com>
    28
  • cpukit/libnetworking/nfs/bootp_subr.c

    r8daecd8 r64db6d3  
    275275  if (dst == NULL) {
    276276    /* first allocation, simply use strdup */
    277     dst = strdup(src);
     277        if (src)
     278        dst = strdup(src);
    278279  }
    279280  else {
    280281    /* already allocated, so use realloc/strcpy */
    281     len = strlen(src) + 1; 
     282    len = src ? strlen(src) + 1 : 0; 
     283        /* src == NULL tells us to effectively free dst */
    282284    dst = realloc(dst,len);
    283285    if (dst != NULL) {
     
    946948    }
    947949
    948   dhcp_hostname = NULL;
     950  if (dhcp_hostname != NULL) {
     951        /* free it */
     952    dhcp_hostname=bootp_strdup_realloc(dhcp_hostname,0);
     953  }
    949954
    950955  /*
Note: See TracChangeset for help on using the changeset viewer.