pactl: return in case of error reading file (avoid using freed d)

This commit is contained in:
Marc-André Lureau 2009-02-17 20:52:11 +02:00 committed by Lennart Poettering
parent 25bbea6749
commit c3eb9086b8

View file

@ -649,6 +649,7 @@ static void stream_write_callback(pa_stream *s, size_t length, void *userdata) {
pa_xfree(d);
fprintf(stderr, _("Premature end of file\n"));
quit(1);
return;
}
pa_stream_write(s, d, length, pa_xfree, 0, PA_SEEK_RELATIVE);