Replaced some large local variables by other means which save stack space
This commit is contained in:
parent
4926c98dd4
commit
54878a538e
@ -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);
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2011.05.02.090908"
|
||||
#define Xorriso_timestamP "2011.05.02.091632"
|
||||
|
Loading…
Reference in New Issue
Block a user