summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/lib/krb5/store_fd.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/heimdal/lib/krb5/store_fd.c')
-rw-r--r--crypto/heimdal/lib/krb5/store_fd.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/crypto/heimdal/lib/krb5/store_fd.c b/crypto/heimdal/lib/krb5/store_fd.c
index 2c795bd..91545d5 100644
--- a/crypto/heimdal/lib/krb5/store_fd.c
+++ b/crypto/heimdal/lib/krb5/store_fd.c
@@ -33,7 +33,7 @@
#include "krb5_locl.h"
-RCSID("$Id: store_fd.c,v 1.8 2001/01/29 02:32:35 assar Exp $");
+RCSID("$Id: store_fd.c,v 1.9 2001/06/24 05:39:51 assar Exp $");
typedef struct fd_storage{
int fd;
@@ -63,7 +63,15 @@ krb5_storage *
krb5_storage_from_fd(int fd)
{
krb5_storage *sp = malloc(sizeof(krb5_storage));
+
+ if (sp == NULL)
+ return NULL;
+
sp->data = malloc(sizeof(fd_storage));
+ if (sp->data == NULL) {
+ free(sp);
+ return NULL;
+ }
sp->flags = 0;
FD(sp) = fd;
sp->fetch = fd_fetch;
OpenPOWER on IntegriCloud