#include <stdlib.h>
int v_error() {
int* p = new int;
*p = 2;
int* u = (int *)malloc(sizeof(int));
*u = 4;
return *p + *u;
}
While i was analysing this code,sonarqube is not reporting memory leak at line 4 but it is reporting memory leak at 7.
Could you please suggest me how to fix this.
we apologise but we missed your topic. We anyway would like to recommend you trying the latest version of our analyser which is shipped in SonarQube 7.5 or available on SonarCloud.
Sonarqube not detecting memory leaks in the code even though all rules are activated in the quality profile .I am using sonarqube 7.6
Can you suggest how to fix this