fix leak
authorMichael Wallner <mike@php.net>
Tue, 25 Jul 2017 09:16:48 +0000 (11:16 +0200)
committerMichael Wallner <mike@php.net>
Tue, 25 Jul 2017 09:21:32 +0000 (11:21 +0200)
src/data.c

index 454f9f5fb47435e9cf6fe5fd0f2107e3f9c30c55..c45ddf6507f2e25b9cce464217e0f6d28be5c008 100644 (file)
@@ -434,14 +434,14 @@ bool psi_data_validate(struct psi_data *dst, struct psi_data *src)
                        cval = psi_impl_def_val_init(PSI_T_INT, NULL);
                        cval->ival.zend.lval = str->size;
                        cnst = psi_const_init(ctyp, sname, cval);
-                       dst->consts = psi_plist_add(dst->consts, &cnst);
+                       src->consts = psi_plist_add(src->consts, &cnst);
                        free(sname);
 
                        ctyp = psi_const_type_init(PSI_T_INT, "int");
                        cval = psi_impl_def_val_init(PSI_T_INT, NULL);
                        cval->ival.zend.lval = str->align;
                        cnst = psi_const_init(ctyp, aname, cval);
-                       dst->consts = psi_plist_add(dst->consts, &cnst);
+                       src->consts = psi_plist_add(src->consts, &cnst);
                        free(aname);
                }
        }