Menu
  • HOME
  • TAGS

C - Program crashes while using malloc

c,crash,malloc,xor-linkedlist

The malloc is not the problem of your implementation. You can test this by removing the entire body of the function except of the first three lines. As Sourav Ghosh pointed out, the main issue is that you don't check if xlist, *xlist, (*xlist)->head or (*xlist)->tail is NULL before using...