Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam 2014-02-19 15:05:07 +00:00
commit ca1d78f523
5 changed files with 12 additions and 7 deletions

View file

@ -130,8 +130,10 @@ paste_replace(struct paste_stack *ps, u_int idx, char *data, size_t size)
{
struct paste_buffer *pb;
if (size == 0)
if (size == 0) {
free(data);
return (0);
}
if (idx >= ARRAY_LENGTH(ps))
return (-1);