mirror of git://git.sysmocom.de/ofono
smart-messaging: set agent to NULL after free
If agent is not set to NULL after it's freed, the following situation would not work: smart_messaging_register_agent() smart_messaging_unregister_agent() smart_messaging_register_agent() And this one could potentially crash oFono: smart_messaging_register_agent() smart_messaging_unregister_agent() smart_messaging_unregister_agent()
This commit is contained in:
parent
8387e79257
commit
16e3c0ffe4
|
@ -165,6 +165,7 @@ static DBusMessage *smart_messaging_unregister_agent(DBusConnection *conn,
|
|||
return __ofono_error_failed(msg);
|
||||
|
||||
sms_agent_free(sm->agent);
|
||||
sm->agent = NULL;
|
||||
|
||||
return dbus_message_new_method_return(msg);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue