diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2015-03-14 13:08:00 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2015-03-14 13:08:00 +0000 |
| commit | e0125cfdd13d08dfc8c8ce4a0d8ff393054ad132 (patch) | |
| tree | d0e744ecfd1d272dd31501aae2c1ef4fa77a13f8 /lib | |
| parent | a857c4c8332c07477356efc2e181c4b87b2347fd (diff) | |
| parent | b36424bd4b148eb0f5a6ce423a86d8c92ce898fc (diff) | |
Notes
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/libc/posix1e/acl_calc_mask.c | 1 | ||||
| -rw-r--r-- | lib/libc/posix1e/acl_strip.c | 14 | ||||
| -rw-r--r-- | lib/libcompiler_rt/Makefile | 6 | ||||
| -rw-r--r-- | lib/libproc/proc_sym.c | 2 | ||||
| -rw-r--r-- | lib/libstand/Makefile | 2 | ||||
| -rw-r--r-- | lib/libstand/dosfs.c | 3 |
6 files changed, 21 insertions, 7 deletions
diff --git a/lib/libc/posix1e/acl_calc_mask.c b/lib/libc/posix1e/acl_calc_mask.c index a2d15276bf3e0..56215b9094c66 100644 --- a/lib/libc/posix1e/acl_calc_mask.c +++ b/lib/libc/posix1e/acl_calc_mask.c @@ -104,6 +104,7 @@ acl_calc_mask(acl_t *acl_p) /* if no mask exists, check acl_cnt... */ if (acl_int_new->acl_cnt == ACL_MAX_ENTRIES) { errno = ENOMEM; + acl_free(acl_new); return (-1); } /* ...and add the mask entry */ diff --git a/lib/libc/posix1e/acl_strip.c b/lib/libc/posix1e/acl_strip.c index ae37b38a137aa..85dfb4721a3c2 100644 --- a/lib/libc/posix1e/acl_strip.c +++ b/lib/libc/posix1e/acl_strip.c @@ -82,8 +82,10 @@ _posix1e_acl_strip_np(const acl_t aclp, int recalculate_mask) have_mask_entry = 0; acl_new = acl_init(ACL_MAX_ENTRIES); - if (acl_new == NULL) + if (acl_new == NULL) { + acl_free(acl_old); return (NULL); + } tag = ACL_UNDEFINED_TAG; /* only save the default user/group/other entries */ @@ -94,16 +96,16 @@ _posix1e_acl_strip_np(const acl_t aclp, int recalculate_mask) assert(_entry_brand(entry) == ACL_BRAND_POSIX); if (acl_get_tag_type(entry, &tag) == -1) - return (NULL); + goto fail; switch(tag) { case ACL_USER_OBJ: case ACL_GROUP_OBJ: case ACL_OTHER: if (acl_get_tag_type(entry, &tag) == -1) - return (NULL); + goto fail; if (acl_get_permset(entry, &perm) == -1) - return (NULL); + goto fail; if (acl_create_entry(&acl_new, &entry_new) == -1) return (NULL); if (acl_set_tag_type(entry_new, tag) == -1) @@ -120,6 +122,10 @@ _posix1e_acl_strip_np(const acl_t aclp, int recalculate_mask) default: break; } +fail: + acl_free(acl_new); + acl_free(acl_old); + return (NULL); } assert(_acl_brand(acl_new) == ACL_BRAND_POSIX); diff --git a/lib/libcompiler_rt/Makefile b/lib/libcompiler_rt/Makefile index 659f9e12154c1..a237399890750 100644 --- a/lib/libcompiler_rt/Makefile +++ b/lib/libcompiler_rt/Makefile @@ -56,12 +56,18 @@ SRCF= absvdi2 \ fixdfti \ fixsfdi \ fixsfti \ + fixtfdi \ + fixtfsi \ + fixtfti \ fixunsdfdi \ fixunsdfsi \ fixunsdfti \ fixunssfdi \ fixunssfsi \ fixunssfti \ + fixunstfdi \ + fixunstfsi \ + fixunstfti \ fixunsxfdi \ fixunsxfsi \ fixunsxfti \ diff --git a/lib/libproc/proc_sym.c b/lib/libproc/proc_sym.c index 5c5ac558bf647..dd52638ce3b74 100644 --- a/lib/libproc/proc_sym.c +++ b/lib/libproc/proc_sym.c @@ -91,7 +91,7 @@ find_dbg_obj(const char *path) snprintf(dbg_path, sizeof(dbg_path), "/usr/lib/debug/%s.debug", path); fd = open(dbg_path, O_RDONLY); - if (fd > 0) + if (fd >= 0) return (fd); else return (open(path, O_RDONLY)); diff --git a/lib/libstand/Makefile b/lib/libstand/Makefile index 4a1fa2cca7298..a5a135f7fd34d 100644 --- a/lib/libstand/Makefile +++ b/lib/libstand/Makefile @@ -28,7 +28,7 @@ CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float CFLAGS.gcc+= -mpreferred-stack-boundary=2 .endif .if ${MACHINE_CPUARCH} == "amd64" -CFLAGS+= -fPIC +CFLAGS+= -fPIC -mno-red-zone .endif .if ${MACHINE} == "pc98" CFLAGS+= -Os diff --git a/lib/libstand/dosfs.c b/lib/libstand/dosfs.c index 72205a2c648a5..b75d752fdc236 100644 --- a/lib/libstand/dosfs.c +++ b/lib/libstand/dosfs.c @@ -786,7 +786,8 @@ static int ioget(struct open_file *fd, u_int lsec, void *buf, u_int nsec) { int err; - + + twiddle(1); if ((err = (fd->f_dev->dv_strategy)(fd->f_devdata, F_READ, lsec, secbyt(nsec), buf, NULL))) return(err); |
