org.freedesktop.DBus.GLib.ReturnVal frees returns value

frederic heem frederic.heem at
Fri Sep 15 09:24:36 PDT 2006

A nasty problem has been found with valgrind. Here is the following function 

    <method name="getInstance">
      <annotation name="org.freedesktop.DBus.GLib.CSymbol" 
      <arg type="s" name="name" direction="out">
        <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value="error"/>
Here is the following declaration:
const gchar* sniffer_get(Sniffer *pSniffer, GError **ppError)

sniffer_get allocates the string, stores it as the key value in a hash table 
and return the pointer to the string. Valgrind found that dbus is freeing the 
return value ?  
Dbus must not free memory an application has allocated because there could be 
a mismatch malloc/free between the application and libdbus. 


--- NOTICE ---

CONFIDENTIALITY - This  email  and  any  attachments  are confidential and are
intended  for  the  addressee  only.   If  you  have  received this message by
mistake,  please  contact us immediately and then delete the message from your
system.  You  must  not copy, distribute, disclose or act upon the contents of
this email. Thank you.

PERSONAL DATA PROTECTION  (Law  by  Decree  30. 06.2003 n. 196) - Personal and
corporate  data  submitted  will  be used in a correct, transparent and lawful
manner. The data collected will be processed in paper or computerized form for
the performance of contractual  and  lawful  obligations  as  well  as for the
effective management of business relationship. Data may be disclosed, in Italy
or abroad, for the purpose above mentioned to third  parties  which  cooperate
with Telsey, agents, banks, factoring companies,  credit recovering companies,
credit  insurance  companies,  professional  and  consultants,  and   shipping
companies. In relation to the same purposes, data  may  be  processed  by  the
following  classes  of  executors  or  processors:  management; administration
department; logistics  and  purchase  department; sales department; post sales
department quality department; R&D department; IT department; legal department.
The  data  processor  is  Telsey S.p.A.  The data subject may exercise all the
rights set forth in art. 7 of Law by Decree 30. 06.2003 n. 196 as reported  in
in the following link 


More information about the dbus mailing list