Carrying a pistol lose in a pocket is not particularly safe. Had the pistol been pointing towards the inside of his thigh when fired, he could have quickly bled out if the femoral artery had been hit. Revolvers are safer to carry in such a manner, but even then a pocket holster keeps the weapon's grip in a proper orientation for quick access if needed.
Now the legal proceedings will begin. Does he have an Illinois FOID card? Does he have a permit to CCW? Does he have a record? Lots of questions to be answered.
The story indicates he has been charged. That's how things work here in Crook County. If this had been an intentional shooting by someone with a long criminal record, he likely would not have been charged or any charges would be pled down to a meaningless misdemeanor.