diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2008-04-28 06:35:10 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2008-04-28 06:35:10 +0000 |
commit | 9b684a999cc2c371a445843d766ddfd0419627ce (patch) | |
tree | 967712d995c751b144d3ad3543d44cb0c6354377 /usr.bin/dc/bcode.c | |
parent | 416b7ad491485d877443a1aa10f7b8685748af34 (diff) |
plug three leaks, one reported and fixed by Andreas Gunnarsson in PR 5802,
the others by myself
Diffstat (limited to 'usr.bin/dc/bcode.c')
-rw-r--r-- | usr.bin/dc/bcode.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/dc/bcode.c b/usr.bin/dc/bcode.c index 0549872cfaf..37e5159d898 100644 --- a/usr.bin/dc/bcode.c +++ b/usr.bin/dc/bcode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bcode.c,v 1.36 2008/04/26 20:13:22 otto Exp $ */ +/* $OpenBSD: bcode.c,v 1.37 2008/04/28 06:35:09 otto Exp $ */ /* * Copyright (c) 2003, Otto Moerbeek <otto@drijf.net> @@ -17,7 +17,7 @@ */ #ifndef lint -static const char rcsid[] = "$OpenBSD: bcode.c,v 1.36 2008/04/26 20:13:22 otto Exp $"; +static const char rcsid[] = "$OpenBSD: bcode.c,v 1.37 2008/04/28 06:35:09 otto Exp $"; #endif /* not lint */ #include <ssl/ssl.h> @@ -822,7 +822,7 @@ load_stack(void) { int idx; struct stack *stack; - struct value *value, copy; + struct value *value; idx = readreg(); if (idx >= 0) { @@ -832,7 +832,7 @@ load_stack(void) value = stack_pop(stack); } if (value != NULL) - push(stack_dup_value(value, ©)); + push(value); else warnx("stack register '%c' (0%o) is empty", idx, idx); @@ -1550,6 +1550,7 @@ quitN(void) if (n == NULL) return; i = get_ulong(n); + free_number(n); if (i == BN_MASK2 || i == 0) warnx("Q command requires a number >= 1"); else if (bmachine.readsp < i) |