summaryrefslogtreecommitdiffstats
path: root/dlink.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Examine.c: Fix memory leaks in Examine()Anna Sztukowska2024-09-101-0/+15
| | | | | | | | | Fix memory leaks in Examine() reported by SAST analysis. Implement a method to traverse and free all the nodes of the doubly linked list. Replace for loop with while loop in order to improve redability of the code and free allocated memory correctly. Signed-off-by: Anna Sztukowska <anna.sztukowska@intel.com>
* Include count for \0 character when using strncpy to implement strdup.Jes Sorensen2020-05-191-1/+1
| | | | | | | | | | | We have to include the \0 character in the length when copying a string with strncpy() for which length was found with strlen(). Otherwise the destination will not get null terminated - except that we explicitly zeroed it out earlier. This quiets down the compiler's warnings. Signed-off-by: Jes Sorensen <jsorensen@fb.com>
* Remove lots of unnecessary white space.NeilBrown2013-06-191-1/+0
| | | | | | | Now that I am using white-space mode in Emacs I can see all of this, and I don't like it :-) Signed-off-by: NeilBrown <neilb@suse.de>
* Remove scattered checks for malloc success.NeilBrown2012-07-091-8/+4
| | | | | | | | | | | | | | malloc should never fail, and if it does it is unlikely that anything else useful can be done. Best approach is to abort and let some super-daemon restart. So define xmalloc, xcalloc, xrealloc, xstrdup which don't fail but just print a message and exit. Then use those removing all the tests for failure. Also replace all "malloc;memset" sequences with 'xcalloc'. Signed-off-by: NeilBrown <neilb@suse.de>
* mdadm-1.5.0mdadm-1.5.0Neil Brown2004-01-221-0/+3
|
* mdctl-v0.4mdctl-v0.4Neil Brown2001-07-261-0/+76