Changeset ecd8580 in subsurface


Ignore:
Timestamp:
Dec 27, 2017, 5:14:43 PM (4 weeks ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
84d7d80
Parents:
d3118be
Message:

Cleanup: avoid memory leak

Coverity CID 45121
Coverity CID 45163

Signed-off-by: Dirk Hohndel <dirk@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/datatrak.c

    refb2640 recd8580  
    205205                dt_dive->dive_site_uuid = create_dive_site(buffer, dt_dive->when);
    206206        free(locality);
     207        locality = NULL;
    207208        free(dive_point);
    208209
     
    472473                dt_dive->notes = memcpy(dt_dive->notes, buffer, len);
    473474                free(tmp_string1);
    474                 if (tmp_notes_str != NULL)
    475                         free(tmp_notes_str);
    476         }
     475        }
     476        if (tmp_notes_str != NULL)
     477                free(tmp_notes_str);
    477478
    478479        /*
     
    566567        return membuf;
    567568bail:
     569        free(locality);
    568570        free(devdata);
    569571        return NULL;
Note: See TracChangeset for help on using the changeset viewer.