Hi, while looking for memory leaks in my DirectFB application, valgrind pointed out a small memory leak in DirectGetInterface() called from IDirectFB_CreateFont(). Looks like the module filename is copied, but never free'd. The attached patch seems to fix this.
Sven
diff --git a/lib/direct/interface.c b/lib/direct/interface.c index 7ae8ad8..db69789 100644 --- a/lib/direct/interface.c +++ b/lib/direct/interface.c @@ -124,6 +124,10 @@ DirectUnregisterInterface( DirectInterfaceFuncs *funcs ) return; } + if (impl->filename) { + D_FREE( impl->filename ); + } + D_MAGIC_CLEAR( impl ); D_FREE( impl );
_______________________________________________ directfb-dev mailing list directfb-dev@directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev