systemd
Last change
on this file since 1f7dd93 was
09c0ac7,
checked in by William Harrington <kb0iic@…>, 9 years ago
|
Add the Bc memory leak check patch.
|
-
Property mode set to
100644
|
File size:
1.4 KB
|
Rev | Line | |
---|
[09c0ac7] | 1 | Submitted By: Bruce Dubbs (bdubbs at linuxfromscratch dot org) |
---|
| 2 | Date: 2014-04-18 |
---|
| 3 | Initial Package Version: 1.06.95 |
---|
| 4 | Origin: Gentoo |
---|
| 5 | Description: Fixes memory leaks and an uninitialized variable |
---|
| 6 | |
---|
| 7 | diff -Naur bc-1.06.95.orig/bc/bc.y bc-1.06.95/bc/bc.y |
---|
| 8 | --- bc-1.06.95.orig/bc/bc.y 2006-09-04 21:39:31.000000000 -0500 |
---|
| 9 | +++ bc-1.06.95/bc/bc.y 2014-04-09 13:27:04.602661243 -0500 |
---|
| 10 | @@ -569,6 +569,7 @@ |
---|
| 11 | generate (">"); |
---|
| 12 | break; |
---|
| 13 | } |
---|
| 14 | + free($2); |
---|
| 15 | } |
---|
| 16 | | expression '+' expression |
---|
| 17 | { |
---|
| 18 | diff -Naur bc-1.06.95.orig/bc/storage.c bc-1.06.95/bc/storage.c |
---|
| 19 | --- bc-1.06.95.orig/bc/storage.c 2006-09-04 21:39:31.000000000 -0500 |
---|
| 20 | +++ bc-1.06.95/bc/storage.c 2014-04-09 13:28:11.770763410 -0500 |
---|
| 21 | @@ -99,6 +99,7 @@ |
---|
| 22 | { |
---|
| 23 | f = &functions[indx]; |
---|
| 24 | f->f_defined = FALSE; |
---|
| 25 | + f->f_void = FALSE; |
---|
| 26 | f->f_body = (char *) bc_malloc (BC_START_SIZE); |
---|
| 27 | f->f_body_size = BC_START_SIZE; |
---|
| 28 | f->f_code_size = 0; |
---|
| 29 | diff -Naur bc-1.06.95.orig/bc/util.c bc-1.06.95/bc/util.c |
---|
| 30 | --- bc-1.06.95.orig/bc/util.c 2006-09-04 21:39:31.000000000 -0500 |
---|
| 31 | +++ bc-1.06.95/bc/util.c 2014-04-09 13:27:39.841190064 -0500 |
---|
| 32 | @@ -602,8 +602,7 @@ |
---|
| 33 | case FUNCTDEF: |
---|
| 34 | if (id->f_name != 0) |
---|
| 35 | { |
---|
| 36 | - if (namekind != FUNCT) |
---|
| 37 | - free(name); |
---|
| 38 | + free(name); |
---|
| 39 | /* Check to see if we are redefining a math lib function. */ |
---|
| 40 | if (use_math && namekind == FUNCTDEF && id->f_name <= 6) |
---|
| 41 | id->f_name = next_func++; |
---|
Note: See
TracBrowser
for help on using the repository browser.