From 54878a538e94fe7333a9fc79be7750b6f63e01e2 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 --- xorriso/base_obj.c | 15 ++++++++++++--- xorriso/xorriso_timestamp.h | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/xorriso/base_obj.c b/xorriso/base_obj.c index 5636b4aa..0f0a6891 100644 --- a/xorriso/base_obj.c +++ b/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/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 308945d5..30faeadf 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2011.05.02.090908" +#define Xorriso_timestamP "2011.05.02.091632"