Permalink
Browse files

Fix #401 memory leak because strdup() in parser

(cherry picked from commit 055d568d200ff5626bc66b57dd7f1cad8bd67fbd)
  • Loading branch information...
klirichek committed Aug 21, 2018
1 parent 71ff777 commit 43fca3a4e26139765d0fac8de054200dc4875fc6
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/sphinxexpr.y
@@ -153,8 +153,8 @@ maparg:
map_key:
ident { $$ = $1; }
| TOK_ATTR_STRING { $$ = pParser->Attr2Ident($1); }
| TOK_FUNC_IN { $$ = strdup("in"); }
| TOK_FUNC_RAND { $$ = strdup("rand"); }
| TOK_FUNC_IN { $$ = "in"; }
| TOK_FUNC_RAND { $$ = "rand"; }
;
arg:

0 comments on commit 43fca3a

Please sign in to comment.