
514 So.2d 558 (1987)
STATE of Louisiana
v.
Elijah LYONS.
No. KA-6631.
Court of Appeal of Louisiana, Fourth Circuit.
October 7, 1987.
*559 William J. Guste, Jr., Atty. Gen., William B. Faust, III, and Barbara Rutledge, Asst. Attys. Gen., Harry F. Connick, Dist. Atty., Joseph H. McCusker, III, and Rockne L. Moseley, Asst. Dist. Attys., New Orleans, for appellee.
*560 M. Craig Colwart, Orleans Indigent Defender Program, New Orleans, for appellant.
Before GULOTTA, C.J., and GARRISON and WARD, JJ.
GULOTTA, Chief Judge.
Elijah Lyons appeals from his conviction and sentence for illegally discharging a firearm, a violation of LSA-R.S. 14:94. We affirm.
At approximately 8 a.m. on December 4, 1984, police officers answered a call by the owner of a four-plex on South Carrollton Avenue in New Orleans, who complained that a bullet had been fired through the floor of his second story apartment. Upon investigating, the officers found that the shot appeared to have emanated from Lyon's apartment located beneath his landlord's living quarters.
After examining the exterior of Lyons's apartment and observing that there were no signs of forced entry, one of the officers knocked on his door. When Lyons emerged several minutes afterward, he was arrested, frisked, and informed of his Miranda rights. According to the arresting officer, Lyons spontaneously stated that he had fired a shot because people had been shooting at him with "laser beams", and he gave the police permission to search his apartment. The officers found a loaded.38 revolver with one spent casing on Lyons's bed, and a bullet hole in the ceiling of his bedroom that aligned with the hole in the floor of the landlord's apartment.
Lyons was subsequently charged with violating LSA-R.S. 14:94 by illegally, intentionally, or with criminal negligence discharging a firearm. Following a trial on the merits, a six person jury found defendant guilty as charged, and he received a two year suspended sentence with three years active probation. A condition of the probation was that Lyons serve ninety days in Parish Prison with credit for time previously served. Lyons's probation was later revoked on November 22, 1985, and his two year sentence was made executory.
In two assignments of error, Lyons contends that the trial judge erred in denying his motion to suppress the evidence seized and in imposing an illegal sentence. According to defendant, he did not consent to the search of his apartment, and the arresting officers were not justified in conducting a warrantless search of his bedroom. Defendant further argues the trial judge erred in imposing the maximum suspended sentence and then adding a term of imprisonment as a condition of his probation.
A warrantless search and seizure in a private residence, though per se unreasonable, may be justified under one of the narrow exceptions to the warrant requirement of the Fourth Amendment. State v. Hathaway, 411 So.2d 1074 (La.1982); State v. Perkins, 451 So.2d 1146 (La.App. 4th Cir.1984). One such exception occurs when the occupant of the residence gives police officers his free and voluntary consent to search. State v. Owen, 453 So.2d 1202 (La.1984); State v. Helwig, 489 So.2d 296 (La.App. 4th Cir.1986), writ denied, 495 So.2d 301 (La.1986). Another exception occurs when police enter the residence under "exigent circumstances" such as to prevent the escape of the defendant, to avoid a possible violent confrontation that could cause injury to the officers and the public, or to prevent the destruction of evidence. State v. Hathaway, supra; State v. Perkins, supra.
At the motion to suppress hearing in the instant case, an arresting officer testified that after Lyons had been placed under arrest and informed of his Miranda rights, he gave the police permission to search his house. According to this officer, without any force, intimidation, promises, or inducements by the police, Lyons spontaneously stated that he had shot through the ceiling and told him, "Go ahead in the house, and you can search it." Under these circumstances, the trial judge properly concluded that Lyons freely and voluntarily consented to the search.
Furthermore, even if the consent exception did not apply, the officers were justified in searching the apartment under the "exigent circumstances" exception to *561 insure their safety in the course of investigating the shooting incident. After the gunshot, Lyons had not answered his landlord's telephone call. Later, when the police arrived on the scene, Lyons took several minutes to answer the knock at his door. Obviously apprehensive, the police were justified in searching the defendant in his doorway. Having found no weapon on Lyons, they were justified also in entering the apartment to determine if someone else was armed or was in need of medical attention. In making their brief search to secure the premises, the officers saw the pistol in plain view on defendant's bed. Because the police were justified in intruding into the defendant's apartment and discovered the weapon inadvertently, the evidence of the pistol was admissible under the "plain view" exception. See State v. Hernandez, 410 So.2d 1381 (La.1982).
We further find no merit to defendant's argument concerning the imposition of an illegal sentence. Lyons was sentenced to the statutory maximum of two years at hard labor. Sentence was suspended, and Lyons was placed on active probation for three years with an additional term of ninety days in Parish Prison imposed as condition of probation. We recognize the jurisprudential rule that a suspended sentence plus additional jail time as a condition of probation cannot exceed the maximum statutory sentence for the particular crime involved. State v. Wagner, 410 So.2d 1089 (La.1982); State v. Newell, 497 So.2d 4 (La.App. 4th Cir.1986); State v. Jones, 477 So.2d 914 (La.App. 4th Cir.1985). However, in the instant case, though Lyon's probation was revoked and the two year suspended sentence was made executory, the trial judge stated that Lyons was to be given credit for all time served. Under these circumstances, by giving defendant credit for time served,[1] the trial judge effectively corrected the error of the original sentence and Lyons will not have to serve in excess of the statutory maximum. Because any question of illegality in the original sentence is now moot, defendant need not be resentenced.
Accordingly, the conviction and revised sentence are affirmed.
AFFIRMED.
NOTES
[1]  According to defendant's brief, Lyons "... served his 90 days in Parish Prison and later had his probation revoked...."
