Check-in Number:
|
895 | |
Date: |
2001-Sep-09 00:06:09 (local)
2001-Sep-08 22:06:09 (UTC) |
User: | rse |
Branch: | |
Comment: |
fix memory leak for string parameters |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/l2/l2_ut_param.c 1.4 -> 1.5
--- l2_ut_param.c 2001/09/06 14:37:53 1.4
+++ l2_ut_param.c 2001/09/08 22:06:09 1.5
@@ -86,6 +86,8 @@
*(double *)(pa[i].store) = va_get(ap, double);
break;
case L2_TYPE_STRING:
+ if (*(char **)(pa[i].store) != NULL)
+ free(*(char **)(pa[i].store));
*(char **)(pa[i].store) = va_get(ap, charptr);
if (*(char **)(pa[i].store) != NULL)
*(char **)(pa[i].store) = strdup(*(char **)(pa[i].store));
|
|