diff options
author | Lucas De Marchi <lucas.demarchi@profusion.mobi> | 2011-02-02 16:53:32 -0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2011-02-02 13:23:30 -0600 |
commit | 16e3c0ffe42785e045bf4753a3ca1d7e1f52c01b (patch) | |
tree | 8cff56398c90565d0252a6d0d0495bf7296630d8 /plugins | |
parent | 8387e792576bccb0a63f6f3d43f2e252806b4d4c (diff) | |
download | ofono-16e3c0ffe42785e045bf4753a3ca1d7e1f52c01b.tar.bz2 |
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()
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/smart-messaging.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/smart-messaging.c b/plugins/smart-messaging.c index 40af89f9..52344de2 100644 --- a/plugins/smart-messaging.c +++ b/plugins/smart-messaging.c @@ -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); } |