summaryrefslogtreecommitdiff
path: root/src/intcgm/intcgm2.c
diff options
context:
space:
mode:
authorscuri <scuri>2009-06-23 03:18:33 +0000
committerscuri <scuri>2009-06-23 03:18:33 +0000
commit0610dd4f3064220a2e8fb1d8dc120044eb6c64a8 (patch)
treea5d0d3b6c79e967cd4e80c7668b906e8b422f902 /src/intcgm/intcgm2.c
parent09be96e0606d05b056f82b5f9254208a2d0e4c88 (diff)
*** empty log message ***
Diffstat (limited to 'src/intcgm/intcgm2.c')
-rw-r--r--src/intcgm/intcgm2.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/intcgm/intcgm2.c b/src/intcgm/intcgm2.c
index f16c916..b6be7ee 100644
--- a/src/intcgm/intcgm2.c
+++ b/src/intcgm/intcgm2.c
@@ -1171,7 +1171,7 @@ int cgmb_r ( double *d )
int cgmb_s ( char **str )
{
- register unsigned i;
+ register unsigned i = 0;
unsigned char l;
unsigned short l1;
unsigned short cont;
@@ -1206,9 +1206,7 @@ int cgmb_s ( char **str )
}
s[i] = '\0';
- *str = (char*)strdup ( s );
-
- free ( s );
+ *str = s;
return 0;
}