plugin: fix warnings reported by scan-build

Fixes following warnings reported by scan-build version 9:

 plugin.c:332:3: warning: Potential leak of memory pointed to by 'methods'

Signed-off-by: Petr Štetiar <[email protected]>
5 jobs for yszhou4tech/memory-issues-fixes in 3 minutes and 44 seconds (queued for 1 second)
Status Job ID Name Coverage
  Test
passed #327751886
build with Atheros ATH79 SDK (out of tree)

00:02:52

passed #327751887
build with Freescale i.MX 6 SDK (out of tree)

00:02:50

passed #327751888
build with MIPS Malta CoreLV BE SDK (out of tree)

00:02:41

passed #327751889
build with Marvell Armada Cortex A-53 SDK (out of tree)

00:02:57

passed #327751885
various native checks

00:03:44