summary refs log tree commit diff
path: root/nis/nis_table.c
diff options
context:
space:
mode:
Diffstat (limited to 'nis/nis_table.c')
-rw-r--r--nis/nis_table.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nis/nis_table.c b/nis/nis_table.c
index 5fa3c89e0b..e9e35abf3b 100644
--- a/nis/nis_table.c
+++ b/nis/nis_table.c
@@ -78,7 +78,7 @@ splitname (const_nis_name name, nis_name *ibr_name, int *srch_len,
       if (!val)
 	{
 	  free (cptr);
-	  *srch_val = malloc (sizeof (char *));
+	  *srch_val = malloc (sizeof (nis_attr));
 	  if (*srch_val == NULL)
 	    {
 	      free (cptr);
@@ -86,8 +86,8 @@ splitname (const_nis_name name, nis_name *ibr_name, int *srch_len,
 	      *ibr_name = NULL;
 	      return;
 	    }
-	  (*srch_val)[*srch_len].zattr_val.zattr_val_len = 0;
-	  (*srch_val)[*srch_len].zattr_val.zattr_val_val = NULL;
+	  (*srch_val)[0].zattr_val.zattr_val_len = 0;
+	  (*srch_val)[0].zattr_val.zattr_val_val = NULL;
 	  return;
 	}