SCCS-vsn: usr.bin/window/context.c 3.2
-static char *sccsid = "@(#)context.c 3.1 83/11/22";
+static char *sccsid = "@(#)context.c 3.2 83/11/22";
#endif
#include <stdio.h>
#include "value.h"
#endif
#include <stdio.h>
#include "value.h"
if (cx.x_type != 0) {
xp = (struct context *)
if (cx.x_type != 0) {
xp = (struct context *)
- malloc(1, (unsigned) sizeof (struct context));
+ malloc((unsigned) sizeof (struct context));
if (xp == 0)
return -1;
*xp = cx;
if (xp == 0)
return -1;
*xp = cx;
- if (cx.x_link != 0) {
- free(cx.x_link);
- cx = *cx.x_link;
+ struct context *xp;
+
+ if ((xp = cx.x_link) != 0) {
+ cx = *xp;
+ free((char *)xp);