npp: Fix memory leak on allocation error
authorGuillem Jover <guillem@hadrons.org>
Sat, 1 Jun 2013 16:00:15 +0000 (18:00 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 14 Jun 2013 15:43:45 +0000 (17:43 +0200)
commit26a97221b86ef958715a1c354331432aa71fd64a
tree6f3cd6515300f6aeb32935d544c0a1a817e1d9fe
parentbc1e1caf615defa9b287bfc0ff047f1150e0bd4a
npp: Fix memory leak on allocation error

The pointer to a realloc() function does not get touched on error, so
we need to check if the function failed and either free or update the
pointer.

Warned-by: cppcheck
plugins/npp.c