[riot-notifications] [RIOT-OS/RIOT] tests/malloc: fix of dereferencing a NULL pointer (#11245)

Gunar Schorcht notifications at github.com
Sat Mar 23 14:05:14 CET 2019


### Contribution description

If the memory is exhausted during the allocation of the new `head` structure, subsequent accesses to `head` will result in dereferencing of a NULL pointer. This PR fixes the problem.

### Testing procedure

Compile and flash `tests/malloc` for any board and observe the results. The application should still work.
You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/11245

-- Commit Summary --

  * tests/malloc: fix of dereferencing a NULL pointer

-- File Changes --

    M tests/malloc/main.c (6)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/11245.patch
https://github.com/RIOT-OS/RIOT/pull/11245.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11245
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190323/9004cebc/attachment.html>


More information about the notifications mailing list