summaryrefslogtreecommitdiffstats
path: root/lib/libss/invocation.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>1998-09-16 04:17:47 +0000
committerimp <imp@FreeBSD.org>1998-09-16 04:17:47 +0000
commitbfe73fd683053201c326f9ff2c8e5e0f69cc7fe7 (patch)
treeb17d45198953bfbbad4bfd632dfdf1a37b7159d2 /lib/libss/invocation.c
parent68a8c771724d4fc671cac3ce95f78d4fb1874cfe (diff)
downloadFreeBSD-src-bfe73fd683053201c326f9ff2c8e5e0f69cc7fe7.zip
FreeBSD-src-bfe73fd683053201c326f9ff2c8e5e0f69cc7fe7.tar.gz
Replace memory leaking instances of realloc with non-leaking reallocf.
In some cases replace if (a == null) a = malloc(x); else a = realloc(a, x); with simple reallocf(a, x). Per ANSI-C, this is guaranteed to be the same thing. I've been running these on my system here w/o ill effects for some time. However, the CTM-express is at part 6 of 34 for the CAM changes, so I've not been able to do a build world with the CAM in the tree with these changes. Shouldn't impact anything, but...
Diffstat (limited to 'lib/libss/invocation.c')
-rw-r--r--lib/libss/invocation.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libss/invocation.c b/lib/libss/invocation.c
index 513ec7d..f56c01a 100644
--- a/lib/libss/invocation.c
+++ b/lib/libss/invocation.c
@@ -37,7 +37,7 @@ int ss_create_invocation(subsystem_name, version_string, info_ptr,
for (sci_idx = 1; table[sci_idx] != (ss_data *)NULL; sci_idx++)
;
- table = (ss_data **) realloc((char *)table,
+ table = (ss_data **) reallocf((char *)table,
((unsigned)sci_idx+2)*size);
table[sci_idx+1] = (ss_data *) NULL;
table[sci_idx] = new_table;
OpenPOWER on IntegriCloud