Doesn't this now only vfree devc if it is 0, as opposed to freeing it if
it is allocated? Looks like you introduced a memory leak. If you
really want to be picky, try:
if (NULL != devc)
Technically this is the most correct plus if you always use this order
in testing and you accidentally use = instead of ==, the compiler
catches the bug since you tried to assign to a constant value (at least
when testing against NULL).