summaryrefslogtreecommitdiffstats
path: root/popup.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2023-06-21 08:01:08 +0100
committerThomas Adam <thomas@xteddy.org>2023-06-21 08:01:08 +0100
commit29a5dfc7c0574fcb7ff742a2a6566a8b0800adaa (patch)
tree3407733cf06843488ce5102a7491c3135fb16e08 /popup.c
parentf41c536ff386f24d9e1c12eed960408e4a85b05b (diff)
parent645bf8b3ab9606bff1d94842ea14556c9f1d620a (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'popup.c')
-rw-r--r--popup.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/popup.c b/popup.c
index dc37f002..5686ad17 100644
--- a/popup.c
+++ b/popup.c
@@ -787,6 +787,8 @@ popup_editor(struct client *c, const char *buf, size_t len,
if (fd == -1)
return (-1);
f = fdopen(fd, "w");
+ if (f == NULL)
+ return (-1);
if (fwrite(buf, len, 1, f) != 1) {
fclose(f);
return (-1);