summaryrefslogtreecommitdiff
path: root/navit
diff options
context:
space:
mode:
authortegzed <tegzed@ffa7fe5e-494d-0410-b361-a75ebd5db220>2011-10-09 15:32:23 +0000
committertegzed <tegzed@ffa7fe5e-494d-0410-b361-a75ebd5db220>2011-10-09 15:32:23 +0000
commitbfd37b783ee1266fafb5924fd5146c59c461b2ec (patch)
tree1d4db528bc14f5fdd30009ec94b4e5eb26ff5bf0 /navit
parentf340d7fb7c6b24103e1856f298ad0167713db961 (diff)
downloadnavit-bfd37b783ee1266fafb5924fd5146c59c461b2ec.tar.gz
Fix:core:avoid double free on the return value of get_int_var()
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@4837 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit')
-rw-r--r--navit/navit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/navit/navit.c b/navit/navit.c
index 859ead711..5c0612d22 100644
--- a/navit/navit.c
+++ b/navit/navit.c
@@ -1033,7 +1033,7 @@ navit_cmd_get_int_var(struct navit *this, char *function, struct attr **in, stru
if (in && in[0] && ATTR_IS_STRING(in[0]->type) && in[0]->u.str) {
struct attr*ret = g_hash_table_lookup(cmd_int_var_hash, in[0]->u.str);
if(ret) {
- list[0] = ret;
+ list[0] = attr_dup(ret);
}
else {
struct attr*val = g_new0(struct attr,1);