Date: Tue, 12 Jul 2016 15:27:16 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 211032] ports-mgmt/portfind: crashes on jemalloc free Message-ID: <bug-211032-13-CpnskbhHh2@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-211032-13@https.bugs.freebsd.org/bugzilla/> References: <bug-211032-13@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D211032 --- Comment #5 from Ngie Cooper <ngie@FreeBSD.org> --- This code's broken: 444 char *release =3D calloc(length, sizeof(char)); 445 char *version =3D calloc(length, sizeof(char)); 446 char *tmp =3D version; 447 sysctlbyname("kern.osrelease", release, &length, NULL, 0); 448 char c =3D *release; 449 while(c !=3D '.' && c !=3D '\0') { 450 *tmp++ =3D c; 451 c =3D *(++release); 452 } 453=20 454 free(release); It's freeing the modified pointer to `release`, instead of the original pointer. Trivial fix. I'll send one out over fabricator soon. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-211032-13-CpnskbhHh2>