Changeset 5452


Ignore:
Timestamp:
Oct 7, 2016 1:56:22 AM (8 years ago)
Author:
ming
Message:

Re #1945 (misc): Fixes a memory leak in alsa_factory_refresh().

Thanks to Kal (b17 c0de) for the patch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia-audiodev/alsa_dev.c

    r4818 r5452  
    349349    while (*n != NULL) { 
    350350        char *name = snd_device_name_get_hint(*n, "NAME"); 
    351         if (name != NULL && 0 != strcmp("null", name)) { 
    352             add_dev(af, name); 
     351        if (name != NULL) { 
     352            if (0 != strcmp("null", name)) 
     353                add_dev(af, name); 
    353354            free(name); 
    354355        } 
Note: See TracChangeset for help on using the changeset viewer.