[Ltrace-devel] About memory checks

blackngel blackngel1 at gmail.com
Tue Feb 10 19:17:34 UTC 2009


I think that...

In "read_config_file.c":

*process_line(...) {
  ...
  fun_p = malloc(sizeof(struct function));
  ...
}

It must be check if (fun_p != NULL) or if(!fun_p) in
order to your code. The same at:

"debug.c":

xinfdump(...){
 ... long *infwords = malloc(wrdcnt * sizeof(long)); ...
}

And... at "execute_program.c":

execvp(sp->filename, argv);
fprintf(stderr, "Can't execute `%s': %s\n", sp->filename,
		 strerror(errno));
exit(1);

It should be a best trick to use "_exit()",
but it's a minor thing.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada
	digitalmente
Url : http://lists.alioth.debian.org/pipermail/ltrace-devel/attachments/20090210/e76c2585/attachment.pgp 


More information about the Ltrace-devel mailing list