You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "szsam (via GitHub)" <gi...@apache.org> on 2023/06/25 03:29:33 UTC

[GitHub] [nuttx] szsam commented on pull request #9608: drivers/sensors/apds9960.c: Fix use after free

szsam commented on PR #9608:
URL: https://github.com/apache/nuttx/pull/9608#issuecomment-1605848616

   Also, do we need to call `kmm_free(priv)` in other error handling branches, e.g.
   ``` C
     ret = apds9960_i2c_write8(priv, APDS9960_ENABLE, PON | PEN | GEN | WEN);
     if (ret < 0)
       {
         snerr("ERROR: Failed to initialize the APDS9960!\n");
         kmm_free(priv);
         return ret;
       }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org