FreeBSD Bugzilla – Attachment 144040 Details for
Bug 191285
lang/expect segfault in exp_spawnv
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Replace some ckalloc/ckfree calls in exp_clib.c with malloc/free.
patch-exp_clib.c (text/plain), 878 bytes, created by
Richard M Kreuter
on 2014-06-22 19:58:57 UTC
(
hide
)
Description:
Replace some ckalloc/ckfree calls in exp_clib.c with malloc/free.
Filename:
MIME Type:
Creator:
Richard M Kreuter
Created:
2014-06-22 19:58:57 UTC
Size:
878 bytes
patch
obsolete
>--- exp_clib.c.orig 2014-06-22 15:18:46.000000000 -0400 >+++ exp_clib.c 2014-06-22 15:20:17.000000000 -0400 >@@ -114,7 +114,11 @@ > #include <stdlib.h> /* for malloc */ > #endif > >-#include <tcl.h> >+#define ckalloc(x) Tcl_Alloc(x) >+#define ckfree(x) Tcl_Free(x) >+extern char *Tcl_ErrnoMsg(int err); >+extern char *Tcl_Alloc(unsigned int size); >+extern void Tcl_Free(char *ptr); > #include "expect.h" > #define TclRegError exp_TclRegError > >@@ -389,7 +393,7 @@ > FAIL("regexp too big"); > > /* Allocate space. */ >- r = (regexp *)ckalloc(sizeof(regexp) + (unsigned)rcstate->regsize); >+ r = (regexp *)malloc(sizeof(regexp) + (unsigned)rcstate->regsize); > if (r == NULL) > FAIL("out of space"); > >@@ -399,7 +403,7 @@ > rcstate->regcode = r->program; > regc(MAGIC, rcstate); > if (reg(0, &flags, rcstate) == NULL) { >- ckfree ((char*) r); >+ free ((char*) r); > return(NULL); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 191285
: 144040