Adjacency list from scratch
Out-of-bounds access: an array

Image graph[vertices];


has vertices entries, starting with index 0, with the largest valid index being vertices - 1. The loop

for(int i = 1; i&lt;= vertices; i++)


touches graph[vertices], which is illegal. A correct (and idiamatic) loop is

for(int i = 0; i &lt; vertices; i++)

Testing for memory correctly released via inducing a segfault is, to put it mildly, unconventional. You are not even guaranteed to get one.
Crawling the list is a waste of time. It is much simpler to prepend  the newly created node at the head of the list:

void add_adj_node(Image *graph, int src, int dest, bool directed)
{
    adjList * node = create_node(dest);
    node-&gt;next = graph[src].head;
    graph[src]head = node;
}

Recursive invocation of add_adj_node is confusing. I recommend to have a helper function do_add_adj_node and invoke it like this:

void add_adj_node(Image *graph, int src, int dest) {
    do_add_adj_node(graph, src, dst);
    do_add_adj_node(graph, dst, src);
}