forked from jodal/pyspotify
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
When no user data is given for the callback of a search query, then there can happen a segfault. I propose a patch. But it is to be noted that:
- If the user does not give a user data parameter, then its callback should not have a parameter for it. But I think it makes sense like that. This is a change in the API, but the users will have their code failing with a nice error telling them there is a parameter too many on their callback.
- Looking at the code, there are lots of memory leaks. This is specially a problem for programs which run as daemon. For instance, the two pointers callback and userdata are not decremented for the GC, and the struct containing the pointers is not deallocated. This patch does not address this problem. You should think of using valgrind to hunt those leaks.
I do not know how to attach a file on github:
http://www.valentindavid.com/files/pyspotify-master-segfault_on_search.patch
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels