examples: fix some leaks

This commit is contained in:
Wim Taymans 2017-08-16 13:32:08 +02:00
parent 27f811d726
commit 8f7a19f2e3
3 changed files with 3 additions and 3 deletions

View file

@ -408,7 +408,7 @@ static int impl_node_process_input(void *data)
SDL_RenderPresent(d->renderer); SDL_RenderPresent(d->renderer);
if (map) if (map)
munmap(map, buf->datas[0].maxsize); munmap(map, buf->datas[0].maxsize + buf->datas[0].mapoffset);
handle_events(d); handle_events(d);

View file

@ -389,7 +389,7 @@ static int impl_node_process_input(void *data)
SDL_RenderPresent(d->renderer); SDL_RenderPresent(d->renderer);
if (map) if (map)
munmap(map, buf->datas[0].maxsize); munmap(map, buf->datas[0].maxsize + buf->datas[0].mapoffset);
handle_events(d); handle_events(d);

View file

@ -142,7 +142,7 @@ on_stream_new_buffer(void *_data, uint32_t id)
SDL_RenderPresent(data->renderer); SDL_RenderPresent(data->renderer);
if (map) if (map)
munmap(map, buf->datas[0].maxsize); munmap(map, buf->datas[0].maxsize + buf->datas[0].mapoffset);
pw_stream_recycle_buffer(stream, id); pw_stream_recycle_buffer(stream, id);