Commit Graph

144618 Commits

Author SHA1 Message Date
christos f04c9de45b Coverity CID 2306: Possible memory leak. 2006-03-18 20:23:51 +00:00
christos 5ac5bc844b Coverity CID 1079: Possible NULL deref. 2006-03-18 20:21:50 +00:00
christos 704b63146c Coverity CID 1080: Possible NULL deref. 2006-03-18 20:20:31 +00:00
christos 6672211d0f Coverity CID 2432: Dereference before NULL check. 2006-03-18 19:55:49 +00:00
christos ec39c1a649 Fix compilation. 2006-03-18 19:23:14 +00:00
christos 5900226fad Lint comment. 2006-03-18 19:22:59 +00:00
matt 170f4f3a59 MALLOC -> malloc 2006-03-18 18:56:19 +00:00
chris aee09871fa Fix eeprom == NULL and size test.
Fixes Coverity CID 1109: (sc)->eeprom_data tracked as NULL was
dereferenced.
2006-03-18 18:44:16 +00:00
macallan a7fb3cd241 claim some responsibility 2006-03-18 18:41:09 +00:00
yamt 3aa5cee09f m_print: fix the previous correctly. 2006-03-18 18:17:19 +00:00
dsl 55d48ecf23 Remove the unnecessary 'if (found)' to stop Coverty bleating (CID 864).. 2006-03-18 18:05:13 +00:00
chris 998afe8b1c Move check of strp for NULL to the top of the function, if it's NULL
release the lock and exit.

It could be argued that we only ever call the function with strp being
valid so the test isn't needed, but that requires the caller not to change,
or be altered/broken.

Fixes Coverity CID 2357, strp deferenced before NULL check.
2006-03-18 17:44:13 +00:00
chris 3b6dcb2526 Fix Coverity CID 1473: Static buffer overrun.
Add a counter for the number of pages, so that we print out the ext_pgs
values.
2006-03-18 17:37:17 +00:00
oster 0a0615d52a dag_h will always be NULL in this case, and thus we can eliminate a
bit of dead code.  Addresses Coverity CID 728 NetBSD Scan 5.
2006-03-18 17:34:31 +00:00
jmmv c7259b72b2 Fix apostrophe key on Spanish keyboards. 2006-03-18 17:33:16 +00:00
jmmv 5f4c11af49 WARNS=4
One of the changes fixes Coverity CID 2468 (use of uninitialized error
variable in main).
2006-03-18 17:09:35 +00:00
dsl efc0bc90c3 Count both read bytes and write bytes when we are not showing separate read
and write statistics.  Discovered by go.
Since I broke in in rev 1.31, I guess I'll fix it first!
2006-03-18 16:48:44 +00:00
kardel 063cb750db mem leak: unreachable code prevented freeing of allocated memory
(Coverity CID 612 NetBSD Scan 5)
2006-03-18 15:22:34 +00:00
dsl bee1c2beb6 Make the functions that display the top 8 lines externally visible so
they can be used to head other pages (not ready to commit yet...).
Use puthumanint() for oversize numbers when display_mode is RUN or BOOT (when
very big numbers are to be expected).
Allow an extra column for Csw..Flt.
Adjust some #defines to avoid use of global s & s1.
2006-03-18 14:58:49 +00:00
kardel 012eaf5162 null deref: avoid 0 deref (Coverity CID 987 NetBSD Scan 5) 2006-03-18 14:33:20 +00:00
bouyer d663834226 Fix memory leak if we're adding an existing group name.
Coverity ID 1568.
2006-03-18 14:33:07 +00:00
jmcneill aca78114dc Revert local changes not meant for previous commit. 2006-03-18 14:31:26 +00:00
kardel 36ab9cfe6b buffer bounds: one beyond buffer (Coverity CID 1490 NetBSD Scan 5) 2006-03-18 14:25:17 +00:00
kardel a07906a5a8 buffer bounds: buffer full condition wrong for bounds check (Coverity CID 1508 NetBSD Scan 5) 2006-03-18 14:18:59 +00:00
kardel 630d3f115c buffer bounds: correct > - >= error for bounds check (Coverity CID 1511 NetBSD Scan 5) 2006-03-18 14:08:29 +00:00
kardel 99c0e2540c buffer bounds: clamp index for epobuf to buffer bounds (Coverity CID 1512 NetBSD Scan 5) 2006-03-18 14:02:13 +00:00
bouyer 9d8928a40d Fix dead error condition, coverity ID 747. 2006-03-18 13:56:51 +00:00
bouyer d8a43c47ae Fix a dead error condition, coverity ID 603. 2006-03-18 13:54:21 +00:00
bouyer b1dc0ca141 Remove dead code, fixing coverity ID 745. nameiop can only be CREATE
or DELETE here. This code got cut-n-pasted from ufs_loolup.c, but
is only used in whiteout support. ext2fs doesn't support whiteout.
2006-03-18 13:49:19 +00:00
kardel 80b13f6f4e mem leakage: free old malloced buffer on errors (Coverity CID 2056 NetBSD Scan 5) 2006-03-18 13:44:15 +00:00
kardel ee0722e2b9 avoid close(-1): don't attempt to cleanup INVALID_SOCKET ( ==-1 ) fd's - would lead to close(-1) and FD_CLR((u_int)-1(!), ...) (Coverity CID 1281 NetBSD Scan 5) 2006-03-18 13:13:25 +00:00
jmcneill e0476e5490 Check the return value of AUCONV_MALLOC. Fixes a pile of CIDs related to
auconv.
2006-03-18 13:12:15 +00:00
jmcneill a737ed394b Don't use intarg uninitialized in wsdisplay_usl_ioctl2. Fixes CID 2507 2006-03-18 13:06:38 +00:00
bouyer f7123013b8 bread() will always return a valid bp. So remplace the (always true) if (bp)
with a KASSERT.
Should fix Coverity ID 2444.
2006-03-18 12:48:38 +00:00
dsl 57c63d8912 Avoid indexing beyond the end of a malloced array.
Rework loop to be less confusing.
Coverty 519 made me read this code, but this isn't the 'bug' it found.
2006-03-18 12:48:35 +00:00
kardel 9429ea9653 null deref: backport current ntp code to fix (Coverity CID 759) 2006-03-18 12:40:48 +00:00
rtr b06fd00a81 free buf on error path
coverity 190 / run 5
2006-03-18 12:35:41 +00:00
dan 1c8b9fae53 CIDs 2649, 2650: buf used after free 2006-03-18 12:35:19 +00:00
blymn 8426a88bc7 Fix resource leak if malloc of tb->data failed.
Whitespace cleanup.
2006-03-18 12:18:15 +00:00
dan dbd04f2b27 free buf in error path; CID 2061 2006-03-18 12:15:05 +00:00
peter 13b0033a9d Describe the peter-altq branch. 2006-03-18 11:45:41 +00:00
dsl 46b640e7c6 Coverty 521: fclose() temporary file used when editing label. 2006-03-18 11:38:59 +00:00
dsl 2769bb6a26 Coverty 1212: Avoid close(-1). 2006-03-18 11:15:00 +00:00
dsl 1ec8e10fce Coverty 7449: Change 'return (0)' to 'goto done' so we free(bootstrapbuf)
before exiting with error.
2006-03-18 11:08:19 +00:00
dsl f9603a44ea Coverty 7449: Remove splurious check for 'sep == NULL'. 2006-03-18 11:02:48 +00:00
bouyer d3f24ba785 __wdcwait_reset(): if we hare there we have a wdc pointer, so no need to check
if wdc is not NULL here at all (we were doing it after wdc has been
dereferenced anyway).
Coverity ID 2441.
2006-03-18 10:59:58 +00:00
jnemeth 216a33af30 Fix Coverity run 5, issue 2022 -- memory leak.
Approved by christos@.
2006-03-18 10:53:17 +00:00
dan ccd53bd92b reform a loop to be prettier and appease coverity CID 2618 2006-03-18 10:41:24 +00:00
jnemeth 79787ff03b Fix Coverity run 5, issue 2021 -- memory leak.
Approved by christos@.
2006-03-18 10:22:46 +00:00
jnemeth 1f89beeb43 Fix Coverity run 5, issue 1966 -- memory leak
Approved by christos@.
2006-03-18 10:19:09 +00:00