fixed memleak in mpd_set_password

This commit is contained in:
Andrew Karpow 2015-04-25 00:39:16 +02:00
parent 4ba3e0b70f
commit caddebcec0
1 changed files with 2 additions and 1 deletions

View File

@ -219,8 +219,9 @@ out_host_change:
if(mpd.password)
free(mpd.password);
mpd.password = token;
mpd.password = strdup(token);
mpd.conn_state = MPD_RECONNECT;
free(p_charbuf);
return MG_TRUE;
out_set_pass:
free(p_charbuf);