The district attorney's office said a district court judge has issued an injunction against a law restricting the possession of a large-capacity ammunition magazine. As a result, prosectors will no longer pursue that part of the case against Foster.
Foster still faces felony charges of domestic violence after allegedly attacking his live-in girlfriend.
Prosecutors said the victim suffered a ruptured ear drum, and the woman told authorities at the scene Foster "dragged her by her hair, physically threw her out of the house, and punched her in the head eight to 10 times."
NFL Network's Jim Trotter reported last week Foster isn't subject to the NFL commissioner's exempt list until the league concludes its own investigation into the allegations against the 2017 first-round draft pick.
That made Foster eligible to work out with the 49ers this offseason. However, 49ers CEO Jed York, general manager John Lynch and head coach Kyle Shanahan released a joint statement saying Foster would be held out of the team's offseason program for the time being.
"[Foster] will not participate in team activities as he is tending to his legal matters," 49ers CEO Jed York, general manager John Lynch and head coach Kyle Shanahan said in a statement, per NFL Network's Ian Rapoport. "As previously stated, his future with the team will be determined by the information revealed during the legal process."