lint: when possible do not use GNU extensions
lint: when possible do not use GNU extensions

This fixes build on OpenWrt and handles memory leak.

Signed-off-by: Luka Perkov <fe6d8aafe911b69ec3eecb89e7941038c0d25a22@sartura.hr>
Signed-off-by: Radek Krejci <ac6bc358cf742cff4f5723566468a80fdae7adfe@cesnet.cz>

PavolVican/libyang,PavolVican/libyang,PavolVican/libyang,lukasmacko/libyang,PavolVican/libyang,lukasmacko/libyang,PavolVican/libyang