Skip to contentSkip to conversation

segfault at __list_del function in list.h

alsa-ucm sajeesh sidharthan 1 participant 1 message Jun 20, 2013

lore
Share & tools
lore
#0 lore raw

Hello.

I am testing pulseaudio ucm. I have faced a crash when active ucm device list empty.

Please let me know if following fix can be checked in alsa-lib-1.0.25/include/list.h

old code:

static __inline__ void list_del(struct list_head *entry) {
        __list_del(entry->prev, entry->next);
}

new code:

static __inline__ void list_del(struct list_head *entry) {
    if(entry->prev && entry->next) __list_del(entry->prev, entry->next);
}

Sajeesh