summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xlib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlib.c b/xlib.c
index 3dd9657..e783458 100644
--- a/xlib.c
+++ b/xlib.c
@@ -230,8 +230,10 @@ void uudisp_next_event(struct uudisp *d, void *fds)
Atom type;
int fmt;
- if (!d->inlen && p->pastebuf)
+ if (!d->inlen && p->pastebuf) {
XFree(p->pastebuf);
+ p->pastebuf = NULL;
+ }
if (!FD_ISSET(p->fd, (fd_set *)fds)) return;