mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-06 06:46:29 -04:00
bluez5: handle some allocation failures
This commit is contained in:
parent
6539c2bf8c
commit
057ae16504
2 changed files with 12 additions and 1 deletions
|
|
@ -3505,6 +3505,10 @@ static DBusHandlerResult profile_new_connection(DBusConnection *conn, DBusMessag
|
|||
rfcomm->profile = profile;
|
||||
rfcomm->device = d;
|
||||
rfcomm->path = strdup(path);
|
||||
if (rfcomm->path == NULL) {
|
||||
free(rfcomm);
|
||||
return DBUS_HANDLER_RESULT_NEED_MEMORY;
|
||||
}
|
||||
rfcomm->source.func = rfcomm_event;
|
||||
rfcomm->source.data = rfcomm;
|
||||
rfcomm->source.fd = spa_steal_fd(fd);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue