[Libreoffice-commits] .: 3 commits - dmake/dmake.c dmake/make.c

David Tardon dtardon at kemper.freedesktop.org
Mon May 16 06:43:54 PDT 2011


 dmake/dmake.c |    1 +
 dmake/make.c  |   11 ++++-------
 2 files changed, 5 insertions(+), 7 deletions(-)

New commits:
commit 9dc17c94c734dc69d7f8a7fdcc06f35e886287aa
Author: David Tardon <dtardon at redhat.com>
Date:   Mon May 16 13:00:47 2011 +0200

    free after use

diff --git a/dmake/dmake.c b/dmake/dmake.c
index 8731da2..27513cd 100644
--- a/dmake/dmake.c
+++ b/dmake/dmake.c
@@ -917,6 +917,7 @@ int eflag;
    puts("    -x   - export macro values to environment");
    puts("    -X   - ignore #! lines at start of makefile");
    }
+   FREE(fill);
 
    Quit(0);
 }
commit f9d80888dbb44714fd9e55ca8fa1f96905b8ca80
Author: David Tardon <dtardon at redhat.com>
Date:   Mon May 16 12:58:34 2011 +0200

    dir is always copied--free unconditionally

diff --git a/dmake/make.c b/dmake/make.c
index 470ba32..e5414dd 100644
--- a/dmake/make.c
+++ b/dmake/make.c
@@ -1520,7 +1520,6 @@ char *name;
 int  ignore;
 {
    STRINGPTR   new_dir;
-   int         freedir=FALSE;
 
    DB_ENTER( "Push_dir" );
 
@@ -1528,12 +1527,9 @@ int  ignore;
    if( *dir == '\'' && dir[strlen(dir)-1] == '\'' ) {
       dir = DmStrDup(dir+1);
       dir[strlen(dir)-1]='\0';
-      freedir=TRUE;
    }
-   else if (strchr(dir,'$') != NIL(char)) {
+   else if (strchr(dir,'$') != NIL(char))
       dir = Expand(dir);
-      freedir=TRUE;
-   }
    else
       dir = DmStrDup(dir);
 
@@ -1541,7 +1537,7 @@ int  ignore;
       if( !ignore )
          Fatal( "Unable to change to directory `%s', target is [%s]",
             dir, name );
-      if (freedir) FREE(dir);
+      FREE(dir);
       DB_RETURN( 0 );
    }
 
@@ -1549,7 +1545,7 @@ int  ignore;
    if( Verbose & V_DIR_SET )
       printf( "%s:  Changed to directory [%s]\n", Pname, dir  );
 
-   if (freedir) FREE( dir );
+   FREE( dir );
    TALLOC( new_dir, 1, STRING );
    new_dir->st_next   = dir_stack;
    dir_stack          = new_dir;
commit 2c55e69edef7ed6285fdf790d5bd0e677cc3dab7
Author: David Tardon <dtardon at redhat.com>
Date:   Mon May 16 12:54:18 2011 +0200

    free after use

diff --git a/dmake/make.c b/dmake/make.c
index a948c75..470ba32 100644
--- a/dmake/make.c
+++ b/dmake/make.c
@@ -1044,6 +1044,7 @@ char *pat;
       cmp1 = DmStrPbrk(pfx,DirBrkStr);
       result = DmStrJoin(result,up,-1,TRUE);
    }
+   FREE(up);
 
    pat = DmStrSpn(pat,DirBrkStr);
    /* Append pat to result. */


More information about the Libreoffice-commits mailing list