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 patch was generated by the following semantic patch
(http://coccinelle.lip6.fr/)
// <smpl>
@fix disable is_null,isnt_null1@
expression *E;
@@
- !E
+ E == NULL
// </smpl>