If he is in jail, then he cannot leave, so the library must be within the jail. Since he calls it a 'law library', it must be dedicated to that subject. Therefore, unless you have further context that refutes the fact, it is a prison library, a law library in the prison.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.