summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-10-16xwayland: fix a realloc OOM error casePeter Hutterer1-2/+6
Found by coverity Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-10-16xwayland: make a if noop clearer to the compiler/coverityPeter Hutterer1-3/+6
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-09-12devices: break after finding and removing device from listsDave Airlie1-0/+2
Coverity complains about a use after free in here after the freeing, I can't follow the linked list so well, but whot says the device can only be on one list once, so break should fix it. Signed-off-by: Dave Airlie <airlied@redhat.com>
2018-09-12mibltblt: free prgnSrcClip on error path.Dave Airlie1-0/+2
Pointed out by coverity. Signed-off-by: Dave Airlie <airlied@redhat.com>
2018-09-12xkb: fix what looks to be a copy-paste error with first vs firstMMDave Airlie1-1/+1
Pointed out by coverity. Signed-off-by: Dave Airlie <airlied@redhat.com>
2018-09-12posix_tty: free leak of xf86SetStrOption return value.Dave Airlie1-1/+5
Pointed out by coverity. Signed-off-by: Dave Airlie <airlied@redhat.com>
2018-09-12modesetting: get pEnt after error checksDave Airlie1-2/+2
This saves us having to make sure we clean it up. Pointed out by coverity. Signed-off-by: Dave Airlie <airlied@redhat.com>
2018-09-12glamor: fix leak of fs_getcolor_source.Dave Airlie1-3/+5
This is created using XNFstrdup, so it needs to be freed. Pointed out by coverity. Signed-off-by: Dave Airlie <airlied@redhat.com>
2018-09-12fboverlay: move bpp checks above mallocDave Airlie1-3/+3
Avoids having to free the malloced object. Pointed out by coverity. Signed-off-by: Dave Airlie <airlied@redhat.com>
2018-09-12xi: free modifiers_failed on error path. (v2)Dave Airlie1-2/+2
Pointed out by coverity. v2: set modifies_failed to NULL at start (whot) Signed-off-by: Dave Airlie <airlied@redhat.com>
2018-09-12shm: move shmsize verify before allocating the drawable.Dave Airlie1-12/+13
Otherwise if the VERIFY_SHMSIZE macro fails we leak the drawables we allocated earlier. Noticed by coverity scan. Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-09-23exa: initialise mask_off_x and mask_off_yDave Airlie1-1/+1
These get used at the end of the function in a calculation, even though the result isn't used its not pretty. Pointed out by coverity. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-10-23If fork fails in System(), don't fallthrough to exec()Alan Coopersmith1-0/+1
In the unlikely event of a failure in creating processes, signal masks will fall from the panels above you. Secure your mask before telling your child what to do, since it won't exist, and you will instead cause the server itself to be replaced by a shell running the target program. Found by Coverity #53397: Missing break in switch Execution falls through to the next case statement or default; this might indicate a common typo. In System: Missing break statement between cases in switch statement (CWE-484) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matthieu Herrb <matthieu@herrb.eu> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-23Allocate enough room for both reset & flags attributesAlan Coopersmith1-1/+3
ctx_attribs had room for 3 pairs of attributes, but if both flags & reset attributes were being returned it was storing 4 pairs in the array. Found by Coverity #53442: Out-of-bounds write This could cause an immediate crash or incorrect computations. In create_driver_context: Out-of-bounds write to a buffer (CWE-119) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-09-11Make list tests actually test listsAlan Coopersmith1-12/+12
Coverity scan detected that asserts were setting values, not checking them: CID 53252: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->b = i * 2 has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? CID 53259: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->a = i has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? CID 53260: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->a = i has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? CID 53261: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->b = i * 2 has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? Fixing those to be == caused test_nt_list_insert to start failing as part assumed append order, part assumed insert order, so it had to be fixed to use consistent ordering. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-08-06kinput: allocate enough space for null character.Dave Airlie1-1/+1
This code wasn't allocating enough space and was assigning the NULL one past the end. Pointed out by coverity. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-04Xi: extend PropagateMask to EMASKSIZEPeter Hutterer1-1/+1
Number of devices is 2 + MAXDEVICES, with index 0 and 1 reserved for XIAll{Master}Devices. At the current size, PropagateMask would be overrun in RecalculateDeviceDeliverableEvents(). Found by Coverity. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dave Airlie <airlied@redhat.com>
2012-07-04dix: fix memory leak in TouchEventHistoryReplayPeter Hutterer1-2/+5
Don't leak if ti->history is NULL. Found by coverity. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dave Airlie <airlied@redhat.com>
2012-07-04dix: fix dereference before null checkPeter Hutterer1-1/+3
Found by Coverity. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dave Airlie <airlied@redhat.com>
2011-12-06hal: free tmp_val in one missing caseDave Airlie1-0/+1
Pointed out by coverity scan. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-12-06xv: test correct number of requests. (v2)Dave Airlie1-2/+2
Pointed out by coverity. v2: fix swapped as well, as pointed out by Alan Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-12-06xaa: avoid possible freed pointer reuse in epilogueDave Airlie1-0/+1
If the pGCPriv->flags == 2, then we try to assign the freed pGCPriv->XAAOps avoid this by clearing the flags in to be destroyed pGCPriv. Reported by coverity. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-12-06Xi: avoid overrun of callback array.Dave Airlie1-2/+2
This code had an off-by-one and would allow writing one past the end of the callbacks array. Pointed out by coverity. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-12-06xext: don't free uninitialised pointer when malloc fails. (v2)Dave Airlie1-2/+1
Initialise the pAttr->values to values so if the values allocation fails it just ends up as free(NULL). Pointed out by coverity. v2: use Alan's suggestion. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2009-07-17Revert "Coverity Prevent: RESOURCE_LEAK in AccelSetProfileProperty:"Oliver McFadden1-4/+0
This reverts commit 7333dc2969f60af0abcfb28e7182a5fff9918223. False positive.
2009-07-16Coverity Prevent: RESOURCE_LEAK in AccelSetProfileProperty:Oliver McFadden1-0/+4
Event alloc_arg: Called allocation function "XIPropToInt" on "ptr" [details] 167 rc = XIPropToInt(val, &nelem, &ptr); Event leaked_storage: Variable "ptr" goes out of scope
2009-07-16Coverity Prevent: RESOURCE_LEAK in xf86CrtcSetInitialGammaOliver McFadden1-3/+8
2009-07-16Coverity Prevent: NEGATIVE_RETURNS in fbdev_open_pci:Oliver McFadden1-2/+1
Event var_tested_neg: Variable "fd" tested NEGATIVE At conditional (1): "fd != -1" taking false path 335 if (fd != -1) { Event negative_returns: Tracked variable "fd" was passed to a negative sink. 347 close(fd);
2006-04-14Coverity #804: Another leak on OOM path.Adam Jackson2-1/+9
2006-04-14Coverity #806: Another memory leak on OOM path.Adam Jackson2-1/+8
2006-04-14Coverity #847, #848, #849: Three more memory leaks.Adam Jackson2-0/+8
2006-04-14Coverity #1003, #1004: Two more useless null checks.Adam Jackson2-2/+5
2006-04-14Coverity #1005: Avoid a null deref.Adam Jackson2-2/+8
2006-04-14Coverity #1007: Fix a silly null check.Adam Jackson2-1/+5
2006-04-10Coverity #826: Fix potential memory leak.Daniel Stone2-1/+7
2006-04-09Coverity #340: Fix potential NULL dereference. Clean up proliferation ofDaniel Stone2-121/+120
'register int n' in loops of ProcXkbGetNames.
2006-04-09Coverity #324: Fix potential NULL dereference. (Alan Coopersmith)Daniel Stone2-0/+4
2006-04-09Coverity #169: Fix potential fgets() into NULL (?!?).Daniel Stone2-4/+10
2006-04-09Coverity #323, #445, #446, #447: Fix potential NULL dereferences.Daniel Stone2-0/+23
2006-04-07Coverity #844, #845, #846: Fix memory leaks.Daniel Stone2-3/+22
2006-04-07Coverity #987: Avoid potential NULL dereference.Daniel Stone2-0/+7
2006-04-07Coverity #1216: Fix double-close of file on error.Daniel Stone2-1/+5
2006-04-07Coverity #333, #334 - eliminate unncessary test for always true conditionKeith Packard2-3/+8
in fbEvenStipple.
2006-04-07Coverity #488: Avoid smashing an array on malformed config files.Adam Jackson2-2/+8
2006-04-07Coverity #769: Fix a potential memory leak for systems that allocate onAdam Jackson2-1/+7
malloc(0)
2006-04-07Coverity #838: Plug two more memory leaks.Adam Jackson2-3/+12
2006-04-07Coverity #837: Fix another another memory leak.Adam Jackson2-2/+9
2006-04-07Coverity #836: Fix another memory leak.Adam Jackson2-2/+9
2006-04-07Coverity #835: Plug memory leak in extension section parsing.Adam Jackson2-1/+8
2006-04-07Coverity #812: Fix parser memory leak.Adam Jackson2-0/+6