don’t leak memory (pdksh did), and forgot a hunk
This commit is contained in:
parent
5f31b8c97a
commit
ad3707d17d
6
funcs.c
6
funcs.c
|
@ -38,7 +38,7 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.180 2011/03/26 21:46:02 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.181 2011/03/27 01:30:36 tg Exp $");
|
||||
|
||||
#if HAVE_KILLPG
|
||||
/*
|
||||
|
@ -2700,7 +2700,9 @@ test_eval(Test_env *te, Test_op op, const char *opnd1, const char *opnd2,
|
|||
*/
|
||||
|
||||
nv = shf_smprintf("%s+", opnd1);
|
||||
return (stat(nv, &b1) == 0 && S_ISCDF(b1.st_mode));
|
||||
i = (stat(nv, &b1) == 0 && S_ISCDF(b1.st_mode));
|
||||
afree(nv, ATEMP);
|
||||
return (i);
|
||||
}
|
||||
#else
|
||||
return (0);
|
||||
|
|
5
sh.h
5
sh.h
|
@ -154,7 +154,7 @@
|
|||
#endif
|
||||
|
||||
#ifdef EXTERN
|
||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.454 2011/03/26 21:46:06 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.455 2011/03/27 01:30:38 tg Exp $");
|
||||
#endif
|
||||
#define MKSH_VERSION "R39 2011/03/26"
|
||||
|
||||
|
@ -274,6 +274,9 @@ typedef u_int8_t uint8_t;
|
|||
#ifndef S_ISSOCK
|
||||
#define S_ISSOCK(m) ((m & 0170000) == 0140000)
|
||||
#endif
|
||||
#if !defined(S_ISCDF) && defined(S_CDF)
|
||||
#define S_ISCDF(m) (S_ISDIR(m) && ((m) & S_CDF))
|
||||
#endif
|
||||
#ifndef DEFFILEMODE
|
||||
#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue