I had a crash in release_framebuffer() when I try to use an unconnected connector.
Using valgrind, I tracked it down to the use of uninitialized data. I will provide a pull-request with a simple fix.
$ valgrind ./drm-framebuffer -d /dev/dri/card0 -c HDMI-A-1
==51253== Memcheck, a memory error detector
==51253== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==51253== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==51253== Command: ./drm-framebuffer -d /dev/dri/card0 -c HDMI-A-1
==51253==
Could not find preferred resolution
==51253== Conditional jump or move depends on uninitialised value(s)
==51253== at 0x10AF0E: release_framebuffer (framebuffer.c:49)
==51253== by 0x10B523: get_framebuffer (framebuffer.c:189)
==51253== by 0x10AE84: main (main.c:276)
I had a crash in release_framebuffer() when I try to use an unconnected connector.
Using valgrind, I tracked it down to the use of uninitialized data. I will provide a pull-request with a simple fix.