Page MenuHomeFreeBSD

D9705.diff
No OneTemporary

D9705.diff

Index: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
===================================================================
--- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
+++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
@@ -931,9 +931,11 @@
* reallocate it. We normally won't need to do this
* because providers aren't being loaded all the time.
*/
- if ((p = realloc(p_providers,len)) == NULL)
+ if ((p = realloc(p_providers,len)) == NULL) {
+ free(p_providers);
/* How do we report errors here? */
return;
+ }
p_providers = p;
} else
break;
@@ -1148,8 +1150,10 @@
(void) fcntl(ftfd, F_SETFD, FD_CLOEXEC);
alloc:
- if ((dtp = malloc(sizeof (dtrace_hdl_t))) == NULL)
+ if ((dtp = malloc(sizeof (dtrace_hdl_t))) == NULL) {
+ dt_provmod_destroy(&provmod);
return (set_open_errno(dtp, errp, EDT_NOMEM));
+ }
bzero(dtp, sizeof (dtrace_hdl_t));
dtp->dt_oflags = flags;
Index: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c
===================================================================
--- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c
+++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c
@@ -256,8 +256,10 @@
* Now copy the string data into our buffer list, and then update
* the global counts of strings and bytes. Return str's byte offset.
*/
- if (dt_strtab_copyin(sp, str, len + 1) == -1)
+ if (dt_strtab_copyin(sp, str, len + 1) == -1) {
+ free(hp);
return (-1L);
+ }
sp->str_nstrs++;
sp->str_size += len + 1;

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 11:48 PM (17 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15536484
Default Alt Text
D9705.diff (1 KB)

Event Timeline