Changeset: f486880fdb58 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/f486880fdb58
Modified Files:
monetdb5/modules/mal/txtsim.c
Branch: Jul2021
Log Message:
Plug a hole.
diffs (19 lines):
diff --git a/monetdb5/modules/mal/txtsim.c b/monetdb5/modules/mal/txtsim.c
--- a/monetdb5/modules/mal/txtsim.c
+++ b/monetdb5/modules/mal/txtsim.c
@@ -271,6 +271,7 @@ soundex_code(char *Name, char *Key)
static str
soundex_impl(str *res, str *Name)
{
+ GDKfree(*res);
RETURN_NIL_IF(strNil(*Name), TYPE_str);
*res = (str) GDKmalloc(sizeof(char) * (SoundexLen + 1));
@@ -319,6 +320,7 @@ CMDqgramnormalize(str *res, str *Input)
int i, j = 0;
char c, last = ' ';
+ GDKfree(*res);
RETURN_NIL_IF(strNil(input), TYPE_str);
*res = (str) GDKmalloc(sizeof(char) * (strlen(input) + 1)); /*
normalized strings are never longer than original */
if (*res == NULL)
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list