Just call talloc_free directly rather than through a helper function.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 19 Oct 2008 11:52:56 +0000 (13:52 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 19 Oct 2008 11:52:56 +0000 (13:52 +0200)
lib/util/params.c

index c03edec272cdfbc4aefb673358be754e82b38ffd..7af7ac7348169cd95ef3ccfe7af11affee46ae3c 100644 (file)
@@ -105,11 +105,6 @@ static int mygetc(myFILE *f)
        return (int)( *(f->p++) & 0x00FF );
 }
 
-static void myfile_close(myFILE *f)
-{
-       talloc_free(f);
-}
-
 /* -------------------------------------------------------------------------- **
  * Functions...
  */
@@ -565,7 +560,7 @@ bool pm_process( const char *FileName,
     if( NULL == InFile->bufr )
       {
       DEBUG(0,("%s memory allocation failure.\n", func));
-      myfile_close(InFile);
+      talloc_free(InFile);
       return( false );
       }
     result = Parse( InFile, sfunc, pfunc, userdata );
@@ -573,7 +568,7 @@ bool pm_process( const char *FileName,
     InFile->bSize = 0;
     }
 
-  myfile_close(InFile);
+  talloc_free(InFile);
 
   if( !result )                               /* Generic failure. */
     {