Browse code

core: reset params pointers if there is a failure in parse_params()

- patch by Jijo
(cherry picked from commit b12c2df6ccb903e2ca22d34bb968f3ebc2712b89)

Daniel-Constantin Mierla authored on 09/10/2012 14:30:24 • Marius Zbihlei committed on 10/10/2012 08:20:25
Showing 1 changed files
... ...
@@ -550,6 +550,7 @@ int parse_params(str* _s, pclass_t _c, param_hooks_t* _h, param_t** _p)
550 550
  error:
551 551
 	if (t) pkg_free(t);
552 552
 	free_params(*_p);
553
+	*_p = 0;
553 554
 	return -2;
554 555
 
555 556
  ok: