X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;ds=sidebyside;f=mem.c;h=d8de25732ad46789545cbf5224e7ed04100a6f21;hb=a3d15c17d1389f3047e2c271e69df869f6dd904d;hp=12ece3874e8d5063f6692a670d971fa9e30787ae;hpb=52284820cfaee3773182b71bc96fe2e307d9ee49;p=ir-tcl-moved-to-github.git diff --git a/mem.c b/mem.c index 12ece38..d8de257 100644 --- a/mem.c +++ b/mem.c @@ -5,7 +5,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: mem.c,v $ - * Revision 1.2 1995-08-29 15:30:15 adam + * Revision 1.3 1996-07-03 13:31:14 adam + * The xmalloc/xfree functions from YAZ are used to manage memory. + * + * Revision 1.2 1995/08/29 15:30:15 adam * Work on GRS records. * * Revision 1.1 1995/08/04 11:32:40 adam @@ -26,7 +29,7 @@ */ void *ir_tcl_malloc (size_t n) { - void *p = malloc (n); + void *p = xmalloc (n); if (!p) { logf (LOG_FATAL, "Out of memory. %ld bytes requested", (long) n); @@ -48,7 +51,7 @@ int ir_tcl_strdup (Tcl_Interp *interp, char** p, const char *s) return TCL_OK; } len = strlen(s)+1; - *p = malloc (len); + *p = xmalloc (len); if (!*p) { if (!interp) @@ -68,7 +71,7 @@ int ir_tcl_strdup (Tcl_Interp *interp, char** p, const char *s) */ int ir_tcl_strdel (Tcl_Interp *interp, char **p) { - free (*p); + xfree (*p); *p = NULL; return TCL_OK; }