From 2e967b45439ac01ac37eb045da316f36022db2b4 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Mon, 2 May 2011 09:16:27 +0000 Subject: [PATCH] Replaced some large local variables by other means which save stack space --- libisoburn/trunk/xorriso/base_obj.c | 15 ++++++++++++--- libisoburn/trunk/xorriso/xorriso_timestamp.h | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/libisoburn/trunk/xorriso/base_obj.c b/libisoburn/trunk/xorriso/base_obj.c index 5636b4aa..0f0a6891 100644 --- a/libisoburn/trunk/xorriso/base_obj.c +++ b/libisoburn/trunk/xorriso/base_obj.c @@ -100,11 +100,16 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag) { int i, ret; struct XorrisO *m; - char leafname[SfileadrL]; - + char *leafname= NULL; + + leafname= TSOB_FELD(char, SfileadrL); + if(leafname == NULL) + return(-1); *xorriso= m= TSOB_FELD(struct XorrisO,1); - if(m==NULL) + if(m==NULL) { + free(leafname); return(-1); + } m->libs_are_started= 0; strncpy(m->progname,progname,sizeof(m->progname)-1); m->progname[sizeof(m->progname)-1]= 0; @@ -405,9 +410,13 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag) goto failure; Xorriso_preparer_string(m, m->preparer_id, 1); /* avoids library calls */ + if(leafname != NULL) + free(leafname); return(1); failure:; Xorriso_destroy(xorriso, 0); + if(leafname != NULL) + free(leafname); return(-1); } diff --git a/libisoburn/trunk/xorriso/xorriso_timestamp.h b/libisoburn/trunk/xorriso/xorriso_timestamp.h index 308945d5..30faeadf 100644 --- a/libisoburn/trunk/xorriso/xorriso_timestamp.h +++ b/libisoburn/trunk/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2011.05.02.090908" +#define Xorriso_timestamP "2011.05.02.091632"