]> git.sesse.net Git - vlc/commitdiff
Fix memory leak spotted by Mr_Mirsal
authorRafaël Carré <funman@videolan.org>
Sat, 25 Aug 2007 05:02:13 +0000 (05:02 +0000)
committerRafaël Carré <funman@videolan.org>
Sat, 25 Aug 2007 05:02:13 +0000 (05:02 +0000)
modules/control/dbus.c

index 7dc1aa1a2e6b5c808e0a31c5266ce0bf8316bc5a..09cedeba3e864e20e561d729a2901e20deef19df 100644 (file)
@@ -351,7 +351,7 @@ DBUS_METHOD( Identity )
 {
     REPLY_INIT;
     OUT_ARGUMENTS;
-    char *psz_identity = malloc( strlen( PACKAGE ) + strlen( VERSION ) + 1 );
+    char *psz_identity = malloc( strlen( PACKAGE ) + strlen( VERSION ) + 2 );
     sprintf( psz_identity, "%s %s", PACKAGE, VERSION );
     ADD_STRING( &psz_identity );
     free( psz_identity );