Browse Source

Bugfix: Free old coinbase script before setting a new one

Luke Dashjr 11 years ago
parent
commit
4704ad752f
1 changed files with 1 additions and 0 deletions
  1. 1 0
      miner.c

+ 1 - 0
miner.c

@@ -864,6 +864,7 @@ static char *set_b58addr(const char *arg, struct _cbscript_t *p)
 		free(script);
 		return "Failed to convert address to script";
 	}
+	free(p->data);
 	p->data = script;
 	p->sz = scriptsz;
 	return NULL;