tools/graph2dot: Don't use sizeof(AVFilterGraph), check allocation