Your malloc
seems to be correct.
For your new error it is simply because in main
you are calling insertNodeIntoLinkedList
and you define the function before:
insertNodeInLinkedList
// ^^
Also, you need to include <stdlib.h>
for the malloc
function.