changeset 39346:e5a663fbaaf2

af_alg: fix file descriptor leak * lib/af_alg.c (afalg_stream): Close leak.
author Paul Eggert <eggert@cs.ucla.edu>
date Wed, 09 May 2018 11:05:12 -0700
parents 8a9dcfeeced4
children f9dc53a50a90
files ChangeLog lib/af_alg.c
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed May 09 10:38:17 2018 -0700
+++ b/ChangeLog	Wed May 09 11:05:12 2018 -0700
@@ -1,5 +1,8 @@
 2018-05-09  Paul Eggert  <eggert@cs.ucla.edu>
 
+	af_alg: fix file descriptor leak
+	* lib/af_alg.c (afalg_stream): Close leak.
+
 	af_alg: Pacify --enable-gcc-warnings on GCC 8
 	* lib/af_alg.c (afalg_buffer, afalg_stream): Reorder local decls
 	and checking to pacify gcc -Wjump-misses-init on GCC 8.
--- a/lib/af_alg.c	Wed May 09 10:38:17 2018 -0700
+++ b/lib/af_alg.c	Wed May 09 11:05:12 2018 -0700
@@ -1,5 +1,4 @@
-/* af_alg.c - Functions to compute message digest from file streams using
-   Linux kernel crypto API.
+/* af_alg.c - Compute message digests from file streams and buffers.
    Copyright (C) 2018 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify it
@@ -150,7 +149,7 @@
 #else
           result = -errno;
 #endif
-          goto out_cfd;
+          goto out_ofd;
         }
 
       off_t nbytes = st.st_size - lseek (fd, 0, SEEK_CUR);