google-code-export / gambas

Automatically exported from code.google.com/p/gambas
1 stars 0 forks source link

[gb.dbus] A memory leaks in the handling of errors when calling the dbus #204

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1) Describe the problem.
subj

2) GIVE THE FOLLOWING INFORMATIONS (if they are appropriate):
Version: TRUNK
Revision: r4413
Operating system: any
Distribution: any
Architecture: any
GUI component: any
Desktop used: any

3) Provide a little project that reproduces the bug or the crash.
attached

4) If your project needs a database, try to provide it, or part of it.
none

5) Explain clearly how to reproduce the bug or the crash.
run:
valgrind gbx3 
/home/my/Devel/Gambas/3/probe/bug-gb.dbus-error-handle-memory-leaks.gambas
output:
valgrind gbr3 
/home/my/Devel/Gambas/3/probe/bug-gb.dbus-error-handle-memory-leaks.gambas 
==32605== Memcheck, a memory error detector
==32605== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==32605== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==32605== Command: gbr3 
/home/my/Devel/Gambas/3/probe/bug-gb.dbus-error-handle-memory-leaks.gambas
==32605== 
==32605== 
==32605== HEAP SUMMARY:
==32605==     in use at exit: 22,266 bytes in 78 blocks
==32605==   total heap usage: 1,036 allocs, 958 frees, 153,875 bytes allocated
==32605== 
==32605== LEAK SUMMARY:
==32605==    definitely lost: 61 bytes in 2 blocks
==32605==    indirectly lost: 0 bytes in 0 blocks
==32605==      possibly lost: 0 bytes in 0 blocks
==32605==    still reachable: 22,205 bytes in 76 blocks
==32605==         suppressed: 0 bytes in 0 blocks
==32605== Rerun with --leak-check=full to see details of leaked memory
==32605== 
==32605== For counts of detected and suppressed errors, rerun with: -v
==32605== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 27 from 10)

6) Workaround
Need to add a call dbus_error_free (&error) in the error handler.

Original issue reported on code.google.com by svit...@gmail.com on 21 Jan 2012 at 1:11

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed in revision #4414.

Original comment by benoit.m...@gmail.com on 21 Jan 2012 at 8:10