]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
initialize gpm_fd
authorMichael Scherer <misc@zarb.org>
Tue, 25 Jan 2011 17:24:48 +0000 (18:24 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 25 Jan 2011 17:24:48 +0000 (18:24 +0100)
Set gpm_fd to default value in case of error when opened, to prevent
erronous usage.

form.c

diff --git a/form.c b/form.c
index 5b421fbac4b4e856e93cf48fc97c9d1069395edf..5e01db88502d3630147fb87f309c4cc7adcc8113 100644 (file)
--- a/form.c
+++ b/form.c
@@ -308,6 +308,7 @@ static int Gpm_Open(Gpm_Connect *conn, int flag)
     sock_name = 0;
   } /*if*/
   gpm_flag=0;
+  gpm_fd=-1;
   return -1;
 }