aboutsummaryrefslogtreecommitdiffstats
path: root/g10/photoid.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/photoid.c')
-rw-r--r--g10/photoid.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/g10/photoid.c b/g10/photoid.c
index 8586f0ee5..828514e8d 100644
--- a/g10/photoid.c
+++ b/g10/photoid.c
@@ -236,12 +236,18 @@ void show_photo(const struct user_attribute *attr,PKT_public_key *pk)
command[PHOTO_COMMAND_MAXLEN-1]='\0';
if(exec_write(&spawn,NULL,command,1,1)!=0)
- goto fail;
+ {
+ exec_finish(spawn);
+ goto fail;
+ }
fwrite(attr->data,attr->len,1,spawn->tochild);
if(exec_read(spawn)!=0)
- goto fail;
+ {
+ exec_finish(spawn);
+ goto fail;
+ }
if(exec_finish(spawn)!=0)
goto fail;