Memeory leak when sending a new dbus signal

Naveen Verma ernaveenverma at gmail.com
Fri Jun 12 01:17:11 PDT 2009


Hi,


>
>     DBusMessage *msg;
>
>     DBusMessageIter args;
>
>
>
>     /* create a signal & check for errors */
>
>     msg = dbus_message_new_signal(ObjectName, // object name of the signal
>
>                                   InterfaceName, // interface name of the
> signal
>
>                                   MessageName); // name of the signal
>
>
>
>     if (NULL == msg)
>
>     {
>
>         fprintf(stderr, "Message Null\n");
>
>     }
>
>     dbus_message_iter_init(msg, &args);
>

 --- Are you using this iterator?

>
>
>     // send the message and flush the connection
>
>     if (!dbus_connection_send(conn, msg, &serial))
>
>     {
>
>         fprintf(stderr, "Out Of Memory!\n");
>
>         exit(1);
>
>     }
>
>     dbus_connection_flush(conn);
>
>     dbus_message_unref(msg);
>
> -- Br
Naveen

>
>
> ------------------------------
> http://www.mindtree.com/email/disclaimer.html
>
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20090612/43f63dfd/attachment.html 


More information about the dbus mailing list