Commit Graph

144786 Commits

Author SHA1 Message Date
cube 6a6299eb8f Panic on an unlikely error condition. CID 177. 2006-03-19 23:36:10 +00:00
cube e50e4ee4b2 Free a nvlist used temporarily.
Found by Coverity, CID 179 and 180.
2006-03-19 23:12:59 +00:00
christos 2fd1a9105a Coverity CID 1515: Off-by-one and trash the stack... 2006-03-19 23:10:04 +00:00
christos 1acc910067 Coverity CID 587: Dead code detected because the loop was using the wrong
variable (rc instead of rv).
2006-03-19 23:05:50 +00:00
christos 142b3180cb Coverity CID 882: Avoid NULL deref. 2006-03-19 23:01:03 +00:00
elad 2b9c10de57 Set errno on failure, and man-page updates. 2006-03-19 22:58:21 +00:00
christos ae8f65bfac make krb4 compile before I nuke it. 2006-03-19 22:58:14 +00:00
christos 950274b463 Revert part of previous free'ing because it was really a bug in -lkrb5.
Coverity CID 918: Avoid NULL deref (not strictly necessary).
2006-03-19 22:56:36 +00:00
christos 171dd64c65 Coverity CID 1247: Don't use negative index. 2006-03-19 22:54:00 +00:00
jnemeth 4be1f2c6fd Fix Coverity run 5, issue 1931 -- memory leak. This was noted as being a
bug by cgilbert.
Approved by christos@.
2006-03-19 22:52:01 +00:00
christos e4547e1148 Coverity CID 1904: Don't leak memory on error. 2006-03-19 22:49:59 +00:00
christos a09bebd7da Don't forget to free reply on failure. 2006-03-19 22:45:03 +00:00
matt 6a9dc55430 More variable sized MALLOC -> malloc changes. 2006-03-19 22:39:28 +00:00
christos 0666075024 Coverity CID 1907: Free keyblock, not just the contents. 2006-03-19 22:34:59 +00:00
cube 11820066f8 Close file on error. CID 176. 2006-03-19 22:34:44 +00:00
david f68eabdfe8 Free allocated memory if attach fails.
From Coverity CID 2329
2006-03-19 22:30:56 +00:00
cube 8e4130e5ee Fix various resource leaks, all happenning on error situations (IOW,
shortly before exit(1)).  CIDs 181, 182, 183, 184 and 185.
2006-03-19 22:27:14 +00:00
christos a3f80bb48f - Don't trash error number returned by the handler; return it instead.
- Add default cases and return EINVAL
- Don't check for NULL arguments and return EFAULT. Let it core-dump instead.
  (or add DIAGASSERT)
- Coverity CID 799: Don't dereference m and n if they are known to be NULL.
  Bail out sooner with EINVAL.
2006-03-19 22:18:25 +00:00
christos b3044379df Clarify errno's returned by those functions. 2006-03-19 21:56:04 +00:00
christos 6b99850ef0 Coverity CID 1209: Avoid negative close. While I am there fix bugs (open
returning 0 is ok). Reorganize code to factor out common parts, cleanup
syscall checking and error code return.
2006-03-19 21:55:37 +00:00
christos 5ebcdaa51a Add casts to compile again. 2006-03-19 21:45:33 +00:00
christos 6b8123e7e5 Coverity CID 1909: Prevent memory leak. 2006-03-19 21:21:18 +00:00
christos e5d241d0e4 Coverity CID 2480: Move variable initialization higher up to prevent
uninitialized access during error cleanup.
2006-03-19 21:15:21 +00:00
christos 81cd8f57a4 Coverity CID 2481: Move initialization of variable higher up to prevent
uninitialized access in error path.
2006-03-19 21:11:28 +00:00
christos 082737ff51 Coverity CID 2595: Don't call cc_destroy after cc_close because cc_close
free's the second argument.
2006-03-19 21:07:55 +00:00
christos 4ea32734dc Make this compile again, before I nuke it from orbit. 2006-03-19 21:01:17 +00:00
christos cd35252882 Use float constants! 2006-03-19 20:54:15 +00:00
christos a42e5c8db9 Coverity CID 562: Flip the order of the if statement to prevent unreachable
code.
2006-03-19 20:46:25 +00:00
christos fef1370818 Coverity CID 572: Comment out dead code. 2006-03-19 20:42:44 +00:00
christos 15da190f2c Coverity CID 573: Comment out unreachable code. 2006-03-19 20:41:24 +00:00
christos 4696019f20 Coverity CID 574: Unreachable code due to incorrect constants. Correct
constants according to the comments in the code, and add more comments.
2006-03-19 20:39:48 +00:00
christos 3511ea5c9b Coverity CID 575: comment out dead code. 2006-03-19 20:15:07 +00:00
christos 2ca947f5e7 Coverity CID 107[123]: Leave the assertions in the code, not only when DEBUG
is set.
2006-03-19 20:08:09 +00:00
christos 51566e9c85 Coverity CID 1553: Fix memory leak. While here, fix malloc calls:
- don't cast
- use sizeof(var) instead of sizeof(type)
2006-03-19 20:02:27 +00:00
christos f017961ddf Coverity CID 828: Add an assertion to validate that activeq is initialized;
while here simplify code.
2006-03-19 19:57:22 +00:00
christos 14339635d2 restore struct des_ks_struct used by krb4. Nothing uses it here, so GC it
when KRB4 is ejected.
2006-03-19 19:39:26 +00:00
christos e1b2ea7ce9 Change des_key_schedule to be an array of DES_LONG instead of abusing
struct and union semantics.
2006-03-19 19:35:00 +00:00
tsutsui 8fe92db798 Add trailing semicolons to some macroes which have been changed
using do{}while(/*CONSTCOND*/0) statements.
2006-03-19 19:17:01 +00:00
christos 59586f9983 Coverity CID 1606: Plug memory leak. 2006-03-19 19:12:23 +00:00
christos a8846ec5ac Coverity CID 2734, 2731: Use after free; resource leak 2006-03-19 19:06:39 +00:00
matt 0486735479 More MALLOC -> malloc changes. 2006-03-19 17:50:42 +00:00
christos 6dccf87632 Avoid overflowing static array which c == HAT. 2006-03-19 17:41:55 +00:00
elad 2ff3564ba8 fix memory leak, coverity cid 2032. 2006-03-19 16:48:36 +00:00
elad 0a2d3f7a19 fix memory leaks, coverity cid 2016. 2006-03-19 16:47:09 +00:00
elad f6bc7e7627 fix memory leaks, coverity cids 2028, 2029. 2006-03-19 16:40:32 +00:00
elad 2741a951b4 fix fd leak, coverity cid 2015. 2006-03-19 16:33:26 +00:00
elad be71d6bbfd fix null deref, coverity cid 1341. 2006-03-19 16:29:43 +00:00
cube 3eaff5cb14 Proper resource handling in mkmakefile().
Coverity CIDs: 186, 187, 188 and 189.
2006-03-19 16:27:13 +00:00
elad 8a41610291 fix null deref, coverity cid 1339. 2006-03-19 16:23:19 +00:00
elad 28788b89c7 fix null deref, coverity cid 1340. 2006-03-19 16:20:47 +00:00